patch applied, test added, and re-structured tests

This is an expedited request to get functionality back.  Tests to follow.

https://github.com/bower/registry/commit/f894b576da046d3d508b17b88672e152db4a39b7
sounds like this approach would work, but is there a way to easily mock postgres db w/o having a full setup?