[test] Fix printing subprocess error messages Decode the string as Python 3 returns bytes string, and also don’t assume that it ends with a new line.