Change IMG_FORMAT= to IMAGE_TYPE= (g.i.i uses the latter)
Several cleanup-handling fixes

* actually call cleanup at the end of two hooks
* remove extra CLEANUP=() in one hook (which resets cleanup tasks)
* remove unneeded setting of cleanup traps at start of hooks (already
  set in common.sh)
Add missing $ in two variable tests
Use $MKDIR_P instead of hardcoded mkdir -p in two files
Small formatting alignment-fix