WIP/CI: Debug segfault in ci/code_checks.sh docstrings
xref https://github.com/pandas-dev/pandas/issues/44590
@phofl, @mroeschke: This may be nothing to do with it, but the last log output before the #44590 segfault was from ` errors/__init__.py`.

I ran (on Windows):
>  `python scripts/validate_docstrings.py pandas.errors.DtypeWarning`

repeatedly in multiple processes, and it quickly crashed with contention over test.csv. > repeatedly in multiple processes, and it quickly crashed with contention over test.csv.

It might be good just to use `io.StringIO` here. I don't think it's great in general that the doctests are writing to a file. Not yielding much as of late. Closing