Add error checking after calling docker.buildImage
Merge pull request #14 from resin-io/improve-error-checking

Improve error checking