Encode and decode communication with subprocess.Popen explicitly

This is hopefully a more portable approach among python versions.
Using universal_newlines=True is broken in python3.2.