cppbuild: Use pushd/popd

It is more robust