I actually think i found out what the problem is.. and seem to be able to reproduce the problem as well. I did some testing and came to the following conclusion:
When creating a new file in Notepad++ (W7) and storing it on the BB, calling the function won't load it. However.. if i copy the original run.sh file, rename it to whatever and typing the script in this file (explicitly typing, so no copying), it works.
I'll add this finding to the github, maybe hak5 can do a root cause analysis.