added basneame() to allow passing full path