Bug fixes for HTTP apps

Consistent order of directory lists.

Permanent middleware exposed.