convert dos line endings to unix line endings and remove trailing ws