fix resource_metadata failure missing image data

When image metadata is missing kernel and ramdisk causes exception.

Fixes bug 1197180

Change-Id: Iefb3ac8e92c273ddfff28fe848d2e7b0e6406321
Merge "fix resource_metadata failure missing image data"