check if the image is locally, otherwise pull it

With this change it will work similar to `docker run` command. 

If the image is not locally it will pull it.
Yes I agree with @jaredly, but at the same time my brain reads `~....indexOf(x)` as `contains`. Because I've read a lot of javascript and node modules and it is a very common trick. 

I hope this succeed [domenic/Array.prototype.contains](https://github.com/domenic/Array.prototype.contains) some day.