Fix license check when gcimagebundle is run outside of GCE

I'd like to get this fixed but since the original posters in #32 and #63 haven't responded for a few weeks, here's my take on this.
This patch is based on the discussion in the aforementioned tickets, however I'd appreciate pointers on how to unit test this in a better way (monkeypatching that many attributes as I'm doing now feels a bit hacky).

I tried running unit tests both locally and on GCE (only on wheezy though) and so far there's no failure.