Added the first command under 'build'

Added the first commen under the 'build' command hierarchy.  Fixed
a few places where we were querying the server multiple times without
needing to.  Fixed up some gsub regex to be more flexible.