Updating wait_for_image_status method

* Updated the method to include check for DELETED status with an early exit

Change-Id: I6a7d8523f0c760ab9a8ef8b34eb1ed538264a7da
Merge "Updating wait_for_image_status method"