Refactored recursive file expiry to avoid spurious watchdog warnings on non-empty directories (fixes #99646).