docs: def ensure_local_destination(creds, spec, dry_run):
          # type: (blobxfer.operations.azure.StorageCredentials,
          #        blobxfer.models.download.Specification, bool) -> None
          """Ensure a local destination path given a download spec
          :param blobxfer.operations.azure.StorageCredentials creds: creds
          :param blobxfer.models.download.Specification spec: download spec
          :param bool dry_run: dry run
          """
          # ensure destination path is writable given the source
          if len(spec.sources) < 1:
              raise RuntimeError('no sources to download from specified')
          # set is_dir for destination
          spec.destination.is_dir = True
          if len(spec.sources) == 1:
              # we need to query the source to see if this is a directory
              rpath = str(spec.sources[0].paths[0])
              cont, dir = blobxfer.util.explode_azure_path(rpath)
              if not blobxfer.util.is_none_or_empty(dir):
                  sa = creds.get_storage_account(
                      spec.sources[0].lookup_storage_account(rpath))
                  # ensure at least read permissions
                  if not sa.can_read_object:
                      raise RuntimeError(
                          'unable to prepare for remote path {} as credential '
                          'for storage account {} does not permit read '
                          'access'.format(rpath, sa.name))
                  if (spec.options.mode ==
                          blobxfer.models.azure.StorageModes.File):
                      if (blobxfer.operations.azure.file.check_if_single_file(
                              sa.file_client, cont, dir)[0] and
                              spec.options.rename):
                          spec.destination.is_dir = False
                  else:
                      if (blobxfer.operations.azure.blob.check_if_single_blob(
                              sa.block_blob_client, cont, dir) and
                              spec.options.rename):
                          spec.destination.is_dir = False
          logger.debug('dest is_dir={} for {} specs'.format(
              spec.destination.is_dir, len(spec.sources)))
          # ensure destination path
          if not dry_run:
              spec.destination.ensure_path_exists()