A very manual cherrypick of an old fix.
Add gitattributes. Hopefully this means no more DOS lineendings