Removed the use of pushd and popd.