Use knex for DB access. Closes #46.

I plan to merge this within the hour. Great if anyone has time to look it over.