don't reinvent the wheel: rely on basename(3)

Reviewed by:	nwhitehorn