Use database sort for dictionary export

* Fixes #98