Added checkbox for metadata purge.

- Also added more validation on the
file selection for the cleanup.