generic: validate the path passed to the clean command, refs #53