Sane solution to automatic port allocation.
Merge pull request #226 from schlamar/port-alloc-v2

Sane solution to automatic port allocation.