Prefer the pwd module for getuid when available
Fix stdapi_sys_config_getenv for Python3
Land #4302, zeroSteiner's fix getuid for the python meterpreter