Document and test that ``tempfile`` functions may accept a :term:`path-like object` for the ``dir`` argument. Patch by Anthony Sottile.