Sort the list of folders. Fixes #32