Move to Paste as WSGI wrapper: dev/prod parity!
FIX db session managing

It's not fully fixed yet, probably. This fixes the bug in generate()
that prevents filename to be added.