Add more tests for db package

- Write tests for GDB and GryphonError
- Fix up some existing tests