Prevent corrupting filename in the case the path is contained in a file name
Ex. from current working dir:
DIR/
DIR/prefix_DIR_suffix.ext
DIR/prefix_DIR_suffix.ext would previously be normalize to prefix__suffix.ext since DIR is found in filename. It should instead be normalized to prefix_DIR_suffix.ext.
Prevent corrupting filename in the case the path is contained in a file name
Ex. from current working dir:
DIR/prefix_DIR_suffix.ext
would previously be normalize toprefix__suffix.ext
since DIR is found in filename. It should instead be normalized toprefix_DIR_suffix.ext
.