Added cleanup_on_failure to support exception handling when an image directory is removed.  Including creating a method that
is easier to understand than cleanup.

Replaced cleanup with cleanup_on_failure
Changed add return from cleanup to just an array with the correct values
Added check for 7z existance and execution, assume 7z in the path