uri_escape instead of uri_encode

Unicode support is painfully broken in uri_encode. Replacing with
uri_escape.