Use atomic_write() to have no corruption in case of crashes
Add doctest for pull request #287
Allow OSError
Merge pull request #287 from jdemeyer/atomic_write

Use atomic_write() to have no corruption in case of crashes