Increase the portability of this script a bit: use /usr/bin/env to find bash,
rather than assuming it lives in the path. Patch by Eitan Adler!