Handle _capture_log/_html_content being None
move dbname= handling into PageDB constructor