Ported check_port_free.py to Python 3

check_port_free.py is now runable with python 3 and python 2.