Fix bug with file digest cache not getting passed through.

Plus clean it up by passing an options object around instead of a direct reference to the digest cache. This also made it easier for me to attach other things to the options object, like cumulative file IO duration, for basic profiling.