Was not considering stopped containers, doing so now.

Using `docker ps -a` instead of `docker ps`. Minor refactoring as I like
list comprehensions.
Factoring out docker command calling code.

The same code was being used in too many places, moving it all into a
single function.
Merge pull request #10 from vky/clean-up-and-fixes

Clean up and fixes.