Remove unnecessary pushd and popd