clean up shell scripts

The scripts don't depend on bash, so I corrected the shebangs accordingly. Also I extracted multiple occurences of one and the same path to variables.