def METHOD_NAME(self, path, cleanup=False):
    """
    Prepare dest directory. Create if directory not exist.
    :param path: Path to directory
    :param cleanup: It true clears the contents of directory.
    """
    if self.cmd_state("test -x %s" % path):
        self.cmd("mkdir -p %s" % path)
    if cleanup:
        self.cmd("rm -rf %s" % (os.path.join(path, "*")))