User URI.encode instead of CGI::escape to compose URIs

Closes #134