Fixes a bug with os.getlogin() and when removing dirs