Fix path delimiters on windows for directory middleware