code: function writeFileAtomic(filepath, data, cb) {
  
      var fullpath = u.join(self.path, filepath);
      var dir = path.dirname(fullpath);
  
      var tmppath = u.join(self.tmp, filepath);
      var tmpdir = path.dirname(tmppath);
  
      mkdirp(tmpdir, function(err) {
        if (err) return cb(err);
  
        mkdirp(dir, function(err) {
          if (err) return cb(err);
  
          fs.writeFile(tmppath, data, function(err) {
            if (err) return cb(err);
  
            fs.rename(tmppath, fullpath, function(err) {
              if (err) return cb(err);
              cb();
            });
          });
        });
      });
    }
docs: atomic file write first writes to tmp, then renames data = string or buffer NOTE unlike readfile, this function takes a relative filepath hmm... could be adapted to do versioning TODO hoover tmp