Move tempdir context manager to numpy.testing.utils
FIX isfileobj accepts write-mode files under PY3
Merge pull request #4828 from ogrisel/fix-isfileobj-py3

FIX isfileobj accepts write-mode files under PY3