use encodeURI[Component]() and decodeURIComponent() from httpuv

For review only. Please do not merge until the new version of httpuv is released to CRAN.
http://stackoverflow.com/questions/2678551/when-to-encode-space-to-plus-or-20