Check if image already exists before doing anything else on GCE.

This fixes #1729.