Check cmd before using it
Fixed format string
Merge pull request #49 from sourcegraph/fix-48

Check cmd before using it