A larger refactor to allow for keeping track of several different cached versions of a file.

Simplifies things a bit, by assuming there is only ever one input file at a time (this is 1-1, right?). Also, this significantly changes the internal API, and likely would break many (more than basic) subclasses.