Fix reading versions from cache directory.

When we write into directory we use encodeURIComponent, but when we read, we did nothing. Now we use decodeURIComponent to read the correct version and match the correct cache directory.
Merge pull request #1076 from neoziro/fix-cache-directory-reading

Fix reading versions from cache directory.