templates / branches--on commit alloc_ref_from_str(): factor out a common pattern of alloc_ref from string (737922a)
   1: this is just to ensure the directory exists.