group directories first