Magic file name constants.

Better naming ideas much appreciated.
Add serialization test method.

What it does is to serialize the given item to disk, and check
that it can be read back to the same thing. Does reflect magic,
but it's possible to skip if you don't want to do this.