Fix erroneous behaviour in error cases
Corrects error handling when image creation fails and fixes shutdown behaviour in error cases.
Change-Id: I29b9fbd237b90f6007e4731d9019efb6b4c256ff Signed-off-by: Iason Paraskevopoulos iason.paraskevopoulos@arm.com