Remove batch file if serialization fails.

If we return an error, we shouldn't leave anything around. A future
test tests for this, indirectly.
Magic file name constants.

Better naming ideas much appreciated.
Allow config callbacks to error out.
TestItem config callback.

Not sure this is the right place to put this, or the right way
to call it.

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.