Changed ansi parser to strip hard-coded ansi codes inserted raw into the stream, as discussed in #551.