Fix line endings

Some source files got checked in with \r\n; this change replaces them
with \n (which git will convert to the native line ending).
Add .gitignore file