templates / branches--on commit exclude: split pathname matching code into a separate function (b559263)
   1: this is just to ensure the directory exists.