Support for directory sorting.