Only prefix url with resources/ if not in a worker context

Workers base url is already in the resources directory, so you resolve the url incorrectly if it is
prefixed with "resources/".

Good news, this gets the test passing in Gecko, Blink and Safari.

Closes #975
Merge pull request #976 from caitp/issue-975

Only prefix url with `resources/` if not in a worker context