Add stdin=PIPE to calls to Popen where stdout=PIPE

Fixes a bug that is difficult that seems to affect random systems.
Merge branch 'trira-winerror_6' into dev