Fixed default https port assignment, added tests.

Thanx to @sylvaingi for finding the bug.
Bumped version.
Merge pull request #52 from alexindigo/master

Fixed default https port assignment, added tests.