Hardened the cleanup job; if cache_dir happens to be unset, it no
longer tries to delete the operating system.