templates / branches--on commit plug a few coverity-spotted leaks (dc4cd76)
   1: this is just to ensure the directory exists.