Correctly flush database when re-creating game.dat.

Flush the DB environment before deleting & recreating game.dat, since
otherwise weird bugs due to caching appear.