Fixed file metadata, but now there are more issues (YAY).

For some reason the direntry structures aren't being written back to disk properly.
This currently causes the disk to break. So don't store anything of importance on disk.img.
I've checked the read and writes and they appear to be writing the correct amount of data
to the correct location, but whatever is being written must be incorrect. I'm still looking
into it, but any help or fresh eyes would be great.