ref_prepare.awk: improve default headbase for multi-level remotes
It's easy to guess the headbase value when the remote name is only
a single-level word (e.g. "origin").
With a remote name like "that/one" it's a little more complex, but
since the top-bases location will always be a single-level element
immediately following the remote name (no matter how many levels
there are in it), simply stripping off the last level rather than
picking up the first level gives a better default.
Make it so by requiring at least two levels following a "refs/remotes/"
prefixed topbases setting when headbase is to be defaulted so that
stripping the final level will always leave at least one level of
remote name.
Signed-off-by: Kyle J. McKay <mackyle@gmail.com>