CAS-14283 : Return global dict in restore()
Restore now returns the global image return dictionary. This will keep
the return value consistent with tclean at progam exit.
CAS-14283 : Fix broken unit tests
Some local variables were not being initialized correctly, causing
crashes under certain conditions. That is now fixed.
CAS-14283 : Fix name of `def cmds` to `def _logs`
The previous commit did not contain the name change - something went
wrong between the mustache template and the py file.
Manually rolled back the change and re-did it, and now the function name
change is picked up correctly by the mustache file.