Use stat to check that paths are equivalent