Fix CodeDBHelper.

Add db.close to fix sync error.
Merge pull request #9 from macrov/master

Fix CodeDBHelper.