Clean up files that were created.

def close(self):
        """
        Clean up files that were created.
        """
        if self.file:
            self.file.close()
            self.file = None

        # If temp_file is a folder, we do not remove it because we may
        # still need it after the unpickler is disposed
        if self.tmp_file and _os.path.isfile(self.tmp_file):
            _os.remove(self.tmp_file)
            self.tmp_file = None