santize line inputs and fixed up line endings on Linux.