Fix line ending issue described in #1228

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.