templates / branches--on commit write_index_as_tree: cleanup tempfile on error (c82c75b)
   1: this is just to ensure the directory exists.