Sort out stripping newlines. Should work for UNIX and DOS style.