templates / branches--on commit create_ref_entry(): extract function from add_ref() (cddc425)
   1: this is just to ensure the directory exists.