'Makes sure nothing weird has happened since the last time we
looked at path.  Returns True if path already exists and is ok.
Returns False if path needs to be created.'

def _need_to_create_path(self):

    if (not os.path.exists(self.path)):
        return True
    if (not os.path.isdir(self.path)):
        os.unlink(self.path)
        return True
    if os.path.islink(self.path):
        tmp_root = get_tmp_root()
        if (tmp_root is not None):
            real_path = os.path.realpath(self.path)
            real_tmp = os.path.realpath(tmp_root)
            if (real_path.startswith(real_tmp) and os.path.exists(real_path)):
                return False
            else:
                os.unlink(self.path)
                return True
        else:
            os.unlink(self.path)
            return True
    return False
