Make everything run on Python 2.6 again
Use more robust getpass.getuser instead of os.getlogin.

getpass.getuser works even if not in login shell (no setlogin() call has been made)