Fixed convert spaces functionality

Made changes to support proper functioning of the convert spaces flag.
Merge pull request #108 from cdaveb/master

Fixed convert spaces functionality
Merge pull request #107 from mpryvkin/master

Prevented access to hidden folders through URL parameter
Fixed URL encoding mechanism

URL with port specified (https://www.example.com:444/image.jpg) was incorrectly encoded (https://www.example.com%3A444/image.jpg instead of https://www.example.com:444/image.jpg)