Make middleware work, and move static file handling into a middleware.

This makes for some really ugly code, so I'm going to refactor the
handling entirely (perhaps by treating normal routes as a type of
middleware instead of trying to handle both).
Update README.