Added support for non-UNIX newline formats.