Added Debug/Release switch to build.sh script.

Added flags for each build type. Added debugging symbols for Debug, and
optimization for Release.