Do you mean your code is replacing new lines, but not carriage returns? That's probably because your system line.separator is just a new line, but your Strings have both carriage return and new line. Try changing to:
and see if that works. Even better would be to come up with a regular expression that would match all possible line endings you might get embedded into those strings.
ETA: Oh, well, Andrey beat me to it. I believe that solution would also convert a tab to a space though, and maybe multiple spaces to a single space, which may or may not be a problem.
subject: How to remove carriage returns when writing to a text file