Added dos2unix programs to convert line endings from dos/windows to
unix.

Hopefully this fixes the issues reported by johr in issue #45 and issue #50
reported by Limpster.
Replaced dos2unix call with call to local function sanitize_inputfile().

This makes it more generic and if more processing of input files is
needed, it will only need to be done in one place.