Add test for app creation with config file.

Also be explicit about encoding when writing to file.
Add core settings and a init_db function.

run_devserver will now create and sync database tables on startup.