Refactored Database for the greater good...

...to avoid race conditions when writing files there is an atomic cache.
Also, forget about having multiple files that essentially correspond to
tables in a database. It's even simpler to just have one file for the
time being.