XML escaping improvements

The file https://github.com/jeremycarroll/shunit2/blob/master/examples/math_failing_test.sh
results in a xml report that is not legal XML. The fixes correct this issue.