Use pushd/popd
Factor code to 'lazy_download' function