Override module paths for shared loader

@erikvold I'm not particularly fond of this hack, since it introduces IO and also seems to break tests (presumably because `-o` is set to non existing path in tests. I can likely fix tests to solve this, but I was wondering if you think such a change is reasonable.

Alternative could be to just set `prefs["modules.path."] = toFileURI(root);` which will work for now as it's only us putting stuff to `resource://gre/modules/commonj/` but if that will ever change we're going to break. What do you think is a better solution ?