Merge pull request #54 from zelgerj/master

fixed hostname with trailing dot handling
Merge pull request #55 from zelgerj/master

fixed trailing dot servername without port
bugfix: root domain handling
Merge pull request #56 from wick-ed/master

bugfix: root domain handling
removing double rtrim