update file mode and line endings