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`.
Should we remove the line comment with the note above? Or do you think having it explicitly prevents it from being modified in the future?