update basename with option -d support and adding its man page.