Sort a list of file/directory paths