Fixing a regular expression to match output of 'which' command on both Mac and Linux