Drop dependency on external basename tool