Fixes #54 - Make sqlite db ref rewritable