Revert "use pushd/popd"

This reverts commit b2f14026cdfde27d6b2bc2b77c687949c44194ee.