replace os.getlogin()

In some cases os.getlogin() fails to return username. pwd is correct
way to get username on Unix systems.