Use pushd/popd for build().