Merge pull request #52 from alexindigo/master

Fixed default https port assignment, added tests.