Get free port with test that the port is not in use.

Hi Ed,

I've found the random port process currently being used was not working reliably on my home desktop. I didn't have a problem on my laptop strangely. I've solved this elsewhere in the evasion-common get_free_port() which I've adapted and would like to contribute here. 

Original get_free_port()
 * https://github.com/oisinmulvihill/evasion-common/blob/master/lib/evasion/common/net.py

All the best,

Oisin