Remove all non printable characters from cdata blocks

If there are any unprintable characters (color codes, escape sequences, etc) then TC will complain that the XML cdata blocks have invalid characters. This just cleans up the output to make sure no unprintable characters end up in the output. Test is included.