Add URLEncode for paths before passing them. Attempts to fix #3.