Drop unneeded external dependency on basename
remove basename dependency