Use url.resolve instead of string concat to construct URLs