Unicode characters handling

If script was to produce some non-ascii characters to stdout/stderr
execution plan failed without error message.
This patch fixes unicode handling for those streams
assuming console output is always UTF8/ASCII

Change-Id: Iec9a4b14b3f3d506890b87deb0af66fc196c262d
Closes-Bug: #1398586
Merge "Unicode characters handling"