Correct a missing field from savestates in files.
Keep filehandles open properly when loading state.
Merge pull request #623 from unknownbrackets/savestates

Fix some file-related savestate issues