Simplify some code now that buildModuleUrl always returns absolute URLs.
Add a basic test for buildModuleUrl in require.toUrl mode, which is what the specs run under.