Add trailing slash when selecting directories