BBEdit - same thing I do everything else.... but they shouldn't be one long line. That's probably the problem.
Both of those files require you to edit them... make sure that whatever you edit them in preserves the Unix linefeeds.
That's probably it.
You might want to start with a fresh download or copy of those scripts (before you edit them) and make sure those line feeds get preserved.