Fix output paths in esquery

This was the result of a bad merge, it's easier to tidy it up with another
commit.