Fix ImportError in tests with Sphinx 7.2 The `path` class in `sphinx.testing.util` was a re-export from `sphinx.testing.path`, but that re-export was removed in https://github.com/sphinx-doc/sphinx/commit/49d830467098cc14.
In the same commit, `sphinx.testing.path` was deprecated in favor of pathlib. So instead of switching to `sphinx.testing.path`, switch directly to `pathlib` for new Sphinx versions.