Fix line-ending conversion support
The first support of line-ending conversion was too aggressive. After further
manual testing and investigation of
https://github.com/dulwich/dulwich/issues/693, I realized that line-ending
conversions doesn't apply on every checkin or checkout operation, only on
checkin or checkout operation resulting in a new file being created.
CGit actually tells you when it's applying the line-ending normalization with
a message that looks like: warning: CRLF will be replaced by LF in BRANCH2.
It should hopefully fix #693
Check if the file exists by checking the index rather than the store