URL encoding special characters in path when casting a URL to string
Removing unneeded escaping in the PHP-land URI template implementation
Addresses #371