Test and fix recursive file deletion