restructure do_build to execute in a sub-shell
restructure do_build to execute in a sub-shell

As a best practice, we /shouldn't/ change the directory inside the
callbacks since that position will be persistent throughout the build
process of the package and latter other callbacks or habitat internals
might conflict with that change of state, instead we should 1) execute
commands that depend on a specific path inside a sub-sells or 2) use
pushd and popd to move to a directory and get back where we were before.

Number 1) is more desired but you could use them both.

It is safer to first initialize the variables and then set the values,
especially if you don't know what the content of the variable could be.

All the bundle commands depend on running inside the cache path, I
changed it to use sub-shells to run those commands.

Signed-off-by: Salim Afiune <2b0aff3923bd0ab6bbf45ffb37e57dcea8e1b0b8@chef.io>

chef/chef-dk,chef/chef-dk,chef/chef-dk