Saving/loading with serialization and compression.
Serialize, compress and save data with an EOF marker.
OK is used as an EOF marker to ensure any apparent problems with
corrupted files are reported to the user ASAP.
Read, decompress and deserialize data with an EOF marker.
OK EOF marker ensures any easily detectable file corruption
is discovered and reported before the function returns.
Try to create a directory, if it doesn't exist. Terminate the program with an exception if the directory does not exist, but can't be created.