Extract out a write_db utility method
Make sure braid remove removes entries from the db by forcing a persist of the file
Make sure that the file ends with a new line