Open files for writing in binary mode. Attempts to fix a saved state deletion bug.