Use AtomicFile for atomic update of pickle files