Fix bug in Url (encodeURIComponent instead of encodeURI) and add tests.