Fix bashisms in some shell scripts
Fix shebang in some scripts

These scripts contains bash-specific constructions.
So replace shebang /bin/sh to /bin/bash.