Rewrite permissions, convert line encoding to unix, add shebangs