@yarikoptic using @with_tempfile('foo',dir=True) decorating the function does not work:

Traceback (most recent call last):
  File "/Users/nick/git/PyMVPA/mvpa2/testing/tools.py", line 126, in newfunc
    filename = tempfile.mktemp(*targs, **tkwargs)
  File "/Users/nick/anaconda/lib/python2.7/tempfile.py", line 365, in mktemp
    file = _os.path.join(dir, prefix + name + suffix)
  File "/Users/nick/anaconda/lib/python2.7/posixpath.py", line 77, in join
    elif path == '' or path.endswith('/'):
AttributeError: 'bool' object has no attribute 'endswith'