Support streaming datasets with pathlib.Path.with_suffix
_The documentation is not available anymore as the PR was closed or merged._
This PR extends the support in streaming mode for datasets that use `pathlib.Path.with_suffix`.

Fix #5293.