Universal basename support