Encode bytes from popen

* fixes crash on multiarch systems with python3