Erm, and I just realized: *main.js* imports *Services.jsm*, which provides *dirsvc*, so we don't need to get it ourselves, and this can be as simple as:

    get tempDir() {
      return File.join(Services.dirsvc.get("TmpD", Ci.nsIFile).path, "b2g");
    },