Fix line endings and encodings