Allow dict to be written to a file.