Use command -v instead of which for command checking

Closes #11
Merge pull request #12 from alanpearce/which-command

Use command -v instead of which for command checking