toolcontext: nit_dir tries another heuristic on PATH if procfs is not available
procfs (/proc/) does not exists on some system (macosx).
Therefore the heuristic used to find nit_dir will fail on those system
when the command is invoked from the PATH.
The solution is to add another heuristic, where the program_name is
manually searched inside the directories of PATH in order to find the
original directory.
Reported-by: Alexandre Blondin Massé <alexandre.blondin.masse@gmail.com>
Signed-off-by: Jean Privat <jean@pryen.org>