Error tolerant output decoding

Avoid throwing an exception if the program output is not valid unicode. 

The pull request uses 'replace', but 'ignore' would also do the job. Ideally it would be configurable, but I guess most users would be fine with either (we would).