By the way, although it doesn't help with the PSD task at hand, OpenRaster (.ora) is the libre standard for a minimal graphics interchange format with layers (it's basically a Gzipped TAR with the layers as PNGs and an XML explaining the layer hierarchy).
-Arlo