Fixed a bigger issue where additional slashes where considered when calculating path depth