Replace invocation of `find` with Ruby code that matches old cached files in a better, and safe way to avoid data-integrity issues.