The lesson here is to be careful which tools you use to extract a tarball (.tar.gz) file. We cannot trust winrar and we cannot trust 7-zip (at least on the windows versions).
They insert windows carriage-return characters into script files when extracting them on a windows host PC, which makes them not run correctly when used on a linux machine like a kindle.
I have extracted linux scripts with winrar and 7-zip in the past (16.3 bazillion times, as I recall) and I do not remember ever seeing this problem before. This is really confusing now, and apparently knc1 has tools that misbehave like this too. It sucks when you cannot trust your tools.