FIX isfileobj accepts write-mode files under PY3

Under Python 3, files open in write mode were not recognized as file objects, triggering large memory copies with `np.save`.