Error tolerant output decoding

Avoid throwing an exception if the program output is not valid unicode. Replace invalid bytes by the unicode replacement character.
Merge pull request #1 from smurn/patch-1

Error tolerant output decoding