ENH: add temporary directory context managers

Context managers for working in temporary directories.
BUG: do not write temporary files into source tree

Avoid writing temporary files into the scipy data directory; use a
temporary directory instead.