MRG: fix permissions error in netcdf tests

Netcdf tests failing when installed into system directories because the
tests are writing to the scipy/io/tests/data directory.

Add temporary directory context manager (from nibabel) and use it for
writing the test files.
IANAL, but probably not good to refer to other packages licences like this...