[Issue286] Add support for atomic file renaming

See #286.
I think having a high level notification would be a good idea so it's clear something has has gone wrong which might lead to unexpected behaviour.  Making it one off is a bit of an annoyance, but I think it would be worth it for anyone who runs into this problem.