------Problem solved------
I wrote a few different scripts for testing and I think I found the reason that some scripts don't work. Thanks @latepaul @PeterT for bringing me there
I transfered the scripts via Filezilla on my Kobo. Somehow through this transfer they seem to get messed up (I used auto detection instead of binary transfer. Maybe thats why).
If I log on via telnet on my Kobo and download the scripts via wget they work fine.
It might work with Filezilla in binary mode but at the moment everything works fine and I don't want to touch anything on the Kobo