Fix testing and saving queries

This was a failure to convert everything to promises as it should have
been.

Closes #25