Make changes to the Directory Middleware

- Fix for Issue 846.  Replace backslashes with slashes
- Sort folders and put them before sorted files
- Add a folder icon