fix url rebasing

options.target has to be set so relative urls are resolved correctly.