Use a socket connection instead of toURL.
Add proper tests for PortFinder.
Merge pull request #28 from izrik/improve-port-finder

Improve port finder