rpearce: Clean up image.rb
rpearce: Remove duplication, switch to a shared ensure removed