TST: Use tempfiles in all tests.
related #5419

Includes @jreback's commits from #5422 and hdf_temp:
- TST: make pytables tests go thru a temporary dir and file
- TST/BUG: incorrect way of testing for r+ modes

TST: fix temporary files by using mktemp (rather than mkstemp) which opens them
