Fix for Python3

In Python3 without universal_newlines set to True
output from Popen was byte-encoded.
Merge pull request #2729 from grodzik/master

Fix for Python3