Make sure permalink structure is consistent when running query tests.
Closes #48.