Changes script since pushd/popd not available