Calculate relative urls correctly when using chrome-extension://app-id/ as a base path
Updating for arc and chrome-extension startpage.