Only import pwd in one place, Fixes #4808

Also use `salt.utils.is_windows()` to check for windows.