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.
Merge branch 'feature/freebsd' into c-template

* feature/freebsd:
  Support for FreeBSD