Fix browser mode.

Data files weren't installed previously, so bottle would complain of
missing templates.
Small fixes (if statements, using if item_of_length_0 rather than if item_length == 0)
Hack around errors in browser.

Currently many functions refer to a non-existent call "connect_to_db". Copying the relevant function from GeminiQuery makes at least the error go away, although it is likely a stop-gap solution.