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)
Fixed base URL calculation algorithm when HTTPS protocol is used
Merge pull request #109 from mpryvkin/master

Fixed URL encoding mechanism