Correctly return ignore timeout value.
Ignore pyc files.
Switch to loading the port by port number to make more cross-platform. Also remove mode as it is no longer used.