Normalizes multiple directory separators in normalizePath

This accounts for the scenario where a path may contain two or more consecutive directory separators in a path.
@FrenkyNet So perhaps like this:
```
$normalized = preg_replace('#\\\{2,}#', '\\', trim($normalized, '\\'));
$normalized = preg_replace('#/{2,}#', '/', trim($normalized, '/'));

return $normalized;
```