Provides an atomic implementation of fs.writeFile