Switch to build subpackage

Move as much build-related code into build subpackage.
Merge pull request #17 from ncdc/build-pkg

Switch to build subpackage