fixes #207

Mitchell, here's a fix for this issue.  Here's what I did:

* extract the for loop into its own method
* externalized the call to ec2.Images into a method param to make testing easier
* added a global timeout on the for loop of 1 minute to ensure it would fail eventually
* replaced a few duplicate references to createResp.ImageId with a local variable, imageId
* added tests to handle various cases around waiting for the ami