Fix path discovery

Improved version of #13 which also works for symlinks. I use symlinks from ~/bin to my tools to invoke them, rather than adding many things to PATH.