replace sheband /bin/bash to /bin/sh

Replace sheband /bin/bash to /bin/sh and fix bashisms (unneeded 'functinon' keywords) in scripts.