Mods to get SWORD server to run as an imported module via WSGI; misc. fixes.