Normalizes the given path using the following:
1. removes duplicate slashes/backslashes
2. removes '/./' strings
3. replaces 'path/..' strings with 'path'
4. replaces all slashes/backslashes with the dirSeparator
5. removed trailing slashes if not a root directory
This function modifies the given string
Normalizes the given path using the following: 1. removes duplicate slashes/backslashes 2. removes '/./' strings 3. replaces 'path/..' strings with 'path' 4. replaces all slashes/backslashes with the dirSeparator 5. removed trailing slashes if not a root directory This function modifies the given string