Fixing trailing directory slashes