Remove dependence on free-port.pl

This makes the test suite a little less flexible and fixes the test
port to 30498, but it prevents people needing a correctly set up
Perl on their system.