Update connect.py

Fixing a bug on windows 7 32 bit : 

[IPythonQtConsoleApp] ERROR | Could not setup tunnels
Traceback (most recent call last):
  File "C:\Anaconda\lib\site-packages\IPython\consoleapp.py", line 304, in init_
ssh
    newports = tunnel_to_kernel(info, self.sshserver, self.sshkey)
  File "C:\Anaconda\lib\site-packages\IPython\kernel\connect.py", line 364, in t
unnel_to_kernel
    password = getpass("SSH Password for %s: "%sshserver)
  File "C:\Anaconda\lib\getpass.py", line 95, in win_getpass
    msvcrt.putch(c)
TypeError: must be char, not unicode
[IPythonQtConsoleApp] Exiting application: ipython-qtconsole
When calling getpass,
TypeError: must be char, not unicode
Keywords should shadow magic functions
Disable autocall for prefilter test
catch unicode error listing profiles

there can be garbage files on the filesystem, and we shouldn't be bothered by them.
Fix scrolling output not working
by adding a conditional for the append output
height reset.
use netifaces for faster IPython.utils.localinterfaces
parse ifconfig / ip addr / ipconfig in localinterfaces

also typically faster and more reliable than gethostbyname,
but lower priority than netifaces.
limit random ports to positive values
catch EACCES when binding notebook app

can come up for low ports on *ix, or user access control restrictions on Windows.

closes #4308
fix initial sys.path

recent change caused initial sys.path to lose '' as the first element in the notebook.

closes #4317
test first element of sys.path in Kernel

both when `--profile-dir` is specified, and when it is not.
Scroll to top after slide change event.
Fixed overflow not responding.
Deleted commented addthis toolbar.
Deleted loading of addthis-specific js file and other references.
Use the with statement to open a file.
Remove unused loop variable.
Avoid using a temporary variable by returning the value directly.
Merge pull request #4318 from minrk/sys.path

fix initial sys.path
Merge pull request #4327 from abhinav-upadhyay/use-with-to-read-file

Use the with statement to open a file.