utils.rb:which: bug fix

Closes #27524.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
return found path directly in which