Fixes #1125. --resolve-url eats query and hash from url