ensure trailing-slash on dir URIs