'``temporary_directory`` can be used as a context manager.
It removes the directory upon context.__exit__.'

def test_context_manager(self):

    paths = []
    with temporary_directory() as path:
        paths.append(path)
    [path] = paths
    self.assertFalse(path.exists())
