I wouldn't have exposed nsIURI object in utils, as it might be hard to implement in nodejs.
Instead I would have exposed getUrlHost:
`webappTargetDirName = utils.getUrlHost(webapp.pckManifest.origin);`