why? `basename` is fine, or it have some problem with null-bytes sequence?