Add file logging to production config
Adjust import for logging file handler
Fix raw_grammars so grammars always set

Guarantee that when raw_grammars is accessed, grammars is always
set on the dataset. Fix bug in util.get_username() to handle case
when no user has been set yet.