Replace escape with encodeURIComponent

Both `escape` and `unescape` have been deprecated for many years. The alternative is to use `encodeURIComponent` and it’s counterpart `decodeURIComponent`.

Since using `encodeURIComponent` on the path would produce unwanted results, I have left it unencoded.
Test value which contains “=”.
Merge pull request #9 from iclanzan/patch-2

Replace escape with encodeURIComponent