Just a community service message: Please take care to check that lines are ended in a line-feed (LF) character only, before transferring edited files across to your Shield.
Yesterday, I did not. By default, github's download to Windows gave me CR-LF endings, which semi-bricked my Shield until I could manually fix things via console cable.. Best part of a day lost
I've added a .gitattributes file to our GitHub repository which should prevent people encountering the same problem downloading from there in future. But if you've already got a local repository, probably worth clearing your cache and re-downloading to ensure you don't have any old CR-LF files lying around:
Notepad++ is a good tool for editing files on Windows. It has a toolbar button that makes CR and LF characters visible, and it's text replace dialog allows you to strip the CRs. See this page for more info.
I found out the hard way like yourself that when using winscp under wine in linux to copy files over from my linux computer to the Shield, would randomly change the line ending to CR-LF which would stop the scripts working.
The values in the .gitattributes file just make sure that whatever is uploaded or downloaded from github is converted to use LF for line-endings - irrespective of the defaults your OS or editing software may apply. I've not seen that WinSCP has changed line endings on me, so I'll keep an eye out for that, cheers.