Fix line ending issue

This commit resolves the issue described in #1228, and thus,
eliminates the problem where users on platforms with a different
native line ending, get unstaged changes.

Close #1228.
Merge pull request #1232 from alrra/line-ending

Fix line ending issue described in #1228