Set pwd to none when empty

scan_password is only called when password is None - but not when it's an empty string