Fix bug affecting consistency of CommonJS files.

Previously, when a cacheFile existed, the corresponding commonJsFile would not be (re)written, so reverting back to an older version of one module after an initial build would leave a stale version of the CommonJS module file.