Encode communication with subprocess.Popen explicitly

Python3 makes it necessary to explicitly distinct between binary and
string data. Therefore communication with files and pipes must be
encoded either
 a) using text streams (universal_newlines=True)
 b) manually using .encode(), .decode()

a) seems to be broken and incompatible on python3.2.
b) works on all tested platforms python 2.5 ≤ x ≤ 3.3 and PyPy.
Merge branch 'python3-compatibility' into continuous-integration