Support for FreeBSD

We update the scripts to use `/bin/sh` instead of bash.  Also, a
small update to `CMakeLists.txt` is included for making debugging
a little easier.