add .gitattributes to handle line endings

To avoid issue on different OS
https://help.github.com/articles/dealing-with-line-endings#platform-all