src & lib: use the default behavior of `basename` where applicable