Using the validation functions is handy!

which also corrects the temporary clone dir cleanup problem.