URL-encode characters in the path

Change-Id: I37d810e6b833b3e8e32590e3646476afde10e037
Reviewed-on: http://review.couchbase.org/25115
Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Tested-by: Sergey Avseyev <sergey.avseyev@gmail.com>