Fix clearing target directory