Most of the work is done by the 2to3 script. Popen required the
passing of 'universal_newlines=True', otherwise it returns a byte
stream in python3. __future__ import is added for backwards
compatibility. Lightly tested with python2.7, python3.{6,7,8}.