cleaner: reorganize clean_dir to avoid repeated conditional
cleaner: use ObserverPathnameExtension