Fix directories support and add directories icons.