Memoized file only model

Using the new MemoizedFile throughout the model instead of java.io.File. 

This builds on top of #1034 so also needs some perf testing to make sure we haven't regressed before it's merged.