code: function writeManifest (archive, manifest, cb) {
    manifest = generateManifest(manifest)
    return writeFile(archive, DAT_MANIFEST_FILENAME, JSON.stringify(manifest, null, 2), cb)
  }
docs: helper to write a manifest object