Running the app on mod_wsgi made some problems come to light. Here be the fixes.
Woops. Guess I forgot to rename that one ...