Bug 967118 - Immutable files in cartridges

* Fix exception failure bug
* Fix generating file list
* Fix unit tests
Merge pull request #2647 from jwhonce/bug/967118

Merged by openshift-bot