Added some test code for reading the written res file back in

We endian-swap now, but the ref list offsets still seem to be a bit off, i.e. we write an invalid file.