directory: include trailing slashes to directories