Some small changes

Changed a check to make it more clear.
and added a git attribute to force linux line-endings