Patch a URL that is relative

Just before the link is clicked a base is inserted to avoid problems
with relative URLs. This might mess with links that are purely JS.