Use `command -v` instead of `which`.

Based on https://github.com/pote/gpm/pull/24.
Merge pull request #3 from frodsan/use_command

Use `command -v` instead of `which`.