Use `url.resolve` to concatenate urls

The documentation for `url.resolve` says:

>   Take a base URL, and a href URL, and resolve them as a browser would for an anchor tag.

I believe this is the behavior we want. It will insert slashes where we want them, and keep from putting them where we don't.