Now it's clear why the script doesn't work
Unfortunately I really don't know anything about the Mac's world, so I can't help you anymore.
The obvious thing about the message "bad interpreter" is that it can't find the bash binary "/bin/bash" defined at the top of the script. If you issue "ls -l /bin/bash" what's the output?
About the "sh -x" thing, on Linux "sh" is a symbolic link to bash and it does work. On Mac I dont'know. To overcome this you can insert a line with the command "set -x" just before the video directory variable assignment. The effect is the same, but before you have to fix the interpreter problem or this is totally useless.
And about the "cat" command, it seems that your script file is
a bit messed up.....