Don't crash on nil discoverer (fixes #917)
Windows logfile should follow -home by default (fixes #918)
Cleanup temporary files during directory removal (fixes #919)
Add insane levels of database debugging
Repair incorrect global entries at startup