test: replacing `tmpdir` with `tmp_path` in `tests_pytorch/checkpointing` (#19642)
* refactored tmpdir from the tests_pytorch/checkpointing dir
* fixes
---------
Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>