Added function for checking basename equivalence