Script to tidy up a repository with a rather lot of branches