Move tempdir context manager to numpy.testing.utils
FIX isfileobj accepts write-mode files under PY3