xcrun -find foo
Fixes Homebrew/homebrew#14691. Rewrite in Ruby to facilitate checking PATHs properly.