Updated the write statement, and now we assert that the file is the right length.

(This marks my first use of "assert" in python!!!)
Migrating to the new, easties-free file.

Slightly baffled as to how this was necessary, but glad it's fixed (probably!).