fix renaming only paths that are exact match or end with /