Fix additional issues in the python meterpreter.
Land #2349 pymeterp fixes
Merge remote-tracking branch 'upstream/master'