docs: def ensure_path_exists(self):
          # type: (LocalDestinationPath) -> None
          """Ensure path exists
          :param LocalDestinationPath self: this
          """
          if self._is_dir is None:
              raise RuntimeError('is_dir not set')
          if self._is_dir:
              self._path.mkdir(mode=0o750, parents=True, exist_ok=True)
          else:
              if self._path.exists() and self._path.is_dir():
                  raise RuntimeError(
                      ('destination path {} already exists and is a '
                       'directory').format(self._path))
              else:
                  # ensure parent path exists and is created
                  self._path.parent.mkdir(
                      mode=0o750, parents=True, exist_ok=True)