Bug 967118 - Immutable files in cartridges

* Fix exception failure bug
* Fix generating file list
* Fix unit tests