Append slashes to directories in gitignore files