From http://stackoverflow.com/questions/2108727/which-in-ruby-checking-if-program-exists-in-path-from-ruby; adding a cross-platform solution to provide the path to the pkg binary instead of hard coding it to a static location