Remove excessive calls to mdls

Passes the list of filenames to mdls all at once rather than calling
mdls for each and every file.

I did a quick benchmark of how long it took to generate a cache before
and after this fix. With 1568 files, I was able to reduce the run time
from 51.4 seconds to 1.5 seconds. Woo!