Check the returned image status

We did not check the status of a completed image build; if it
went into the ERROR state, we assumed it worked.  Check the return
value.

Change-Id: I2acf8ac4c5641aa69932230d3414e92620f6e735