Use netstat to determine whether selenium server is running instead of hardcoded sleep