Remove bashisms, change back to /bin/sh