Fixes #5066: Use command instead of which in run-inventory to prevent un...

...needed dependencies

Ticket: http://www.rudder-project.org/redmine/issues/5066

To be merged in 2.11