add_ref(): verify that the refname is formatted correctly