Use netstat to control when selenium starts instead of hardcoded sleep