TST: Check that tofile closes its Python handle when we pass it a str.
TST: Check that tofile closes its Python handle when we pass it a str.

If we pass a str to tofile() rather than an open file object, it will open a Python handle. Make sure that it gets closed correctly.

pdebuyl/numpy,madphysicist/numpy,jakirkham/numpy,pdebuyl/numpy,jakirkham/numpy,mhvk/numpy,pbrod/numpy,anntzer/numpy,jakirkham/numpy,mattip/numpy,pbrod/numpy,jakirkham/numpy,mhvk/numpy,simongibbons/numpy,charris/numpy,charris/numpy,madphysicist/numpy,anntzer/numpy,mattip/numpy,numpy/numpy,pbrod/numpy,mattip/numpy,charris/numpy,simongibbons/numpy,pdebuyl/numpy,rgommers/numpy,seberg/numpy,seberg/numpy,anntzer/numpy,madphysicist/numpy,pbrod/numpy,numpy/numpy,endolith/numpy,seberg/numpy,mhvk/numpy,numpy/numpy,mhvk/numpy,simongibbons/numpy,charris/numpy,endolith/numpy,simongibbons/numpy,madphysicist/numpy,simongibbons/numpy,jakirkham/numpy,numpy/numpy,endolith/numpy,anntzer/numpy,rgommers/numpy,pdebuyl/numpy,endolith/numpy,rgommers/numpy,seberg/numpy,rgommers/numpy,mhvk/numpy,mattip/numpy,madphysicist/numpy,pbrod/numpy