Partially created AtomicFile implementation.

* Going to use a different implementation I found online, but waiting to
  hear back regarding licensing so may come back to this.