I can see the problem now. The code uses CR followed by CRLF on every line. This was probably some kind of unix -> windows EOL conversion bug. Either CRLF or CR's should be killed (personally I'm ok with unix endlines).The code uses CRLF, must be some kind of bug with your git setup - looks "OK" from here (with the ^M that is).
Apparently you set core.autocrlf=false in your git config, (instead of "auto") to avoid it trying to convert things ? --anders