Revert "Remove notdir"
Revert "Remove notdir"

This reverts commit 74938e321a3bb78c3831b8c34057b00381e9fa25.

The `notdir` function was removed in the interest of simplicity. However,
during the implementation of test cases that try to match stderr exactly, the
encoding of unpredictable paths into the stderr files becomes a liability.

We could consider using `basename(3)` here instead, if we want to increase a
dependence on POSIX.

kulp/tenyr,kulp/tenyr,kulp/tenyr