Work on bug #8088.  There is now a function to check to see if a port is available.