fixed newline replacements to work on linux also