Complete rewrite for purpose of cleaner running of promises using wrapper rather than q-sqlite module itself.