Fix line endings and encoding