manager: if UI_DIR is set, serve UI as well

A little hack to also serve the HTML/JavaScript UI if UI_DIR is set to
point to the ui/ directory. One could possibly do this with a
command-line option instead.
Yup. But this is [not defined behaviour](http://flask.pocoo.org/docs/0.10/design/#the-routing-system). For the moment it works and since this code should never actually end up running in production, it's OK for the moment. It also works hanging off '/ui' which I might actually implement instead.