auto trimDirSeparators(R)(R path) if (isBidirectionalRange!R && isSomeChar!(ElementType!R) || isNarrowString!R)