utils.rb:which: bug fix