Fallback to using pwd if os.getlogin() fails (fixes #2)