Percent-escape special characters in URLs

This fixes a user-reported bug that was triggered when there were spaces in the path