Improve the build system a little so that it's easier to switch between debug and
release configurations.  The new step to build is this:

* run the refresh_cmake shell script from the root of your working copy
* cd into either build/release or build/debug
* run make

I also made a couple of minor syntax fixes for release builds.  Not sure why these errors
didn't present themselves during my previous commit