Some minor tweaks to directory upload