Fix directory separators when running on Windows server
Add more directory middleware tests