Fix for OS X, which does not support -printf in find

OS X does not have `-printf` for the `find` command, so instead pipe through `xargs` and `basename` before sorting with `sort`.
I'm using the BSD which:

```
% which ls
ls: aliased to ls -G
% which -a ls
ls: aliased to ls -G
/bin/ls
```

I think the root cause of this is that `which` is a shell builtin for `zsh`:

```
% which which
which: shell built-in command
% bash
$ which which
/usr/bin/which
```