'If cleanup, then the directory will be rmrf\'ed when the object is shutdown.'

def __init__(self, cleanup=True, *args, **kwargs):

    name = tempfile.mkdtemp(*args, **kwargs)
    _Dir.__init__(self, name, cleanup)
