Added a gitignore and a newline character when writing the db file.