Handle subprocess returning bytes (#1014220)
The subprocess module returns bytes in Python 3,
so we need to (try) decoding the output (as utf-8)
for functions that expect text string output and
there is now a execWithCaptureBinary for forwarding
binary output when running commands.
We also need to make sure that the output is "printable"
when binary output logging to the program.log is enabled.