templates / branches--on commit compat: add a basename() compatibility function (e1c0688)
   1: this is just to ensure the directory exists.