correctly clean directory before clone