Fix additional issues in the python meterpreter.
Land #2349 pymeterp fixes