Minor refactor of buildImage() in cmd/imagetool.
Minor refactor of buildImage() in cmd/imagetool.

rgooch/Dominator,Symantec/Dominator,rgooch/Dominator,rgooch/Dominator,keep94/Dominator,keep94/Dominator,Symantec/Dominator,keep94/Dominator,Symantec/Dominator