Refactor the Build CLI code to be easier to read and use Pathname throughout.

This also throws an error if :build_dir is set to a parent directory of :source_dir, which resolves #991.
Merge pull request #1052 from bhollis/builder

Refactor the Build CLI code to be easier to read