make-wmf-branch: move class to its own file

Mixing CLI handling and the class is bad practice. Split them up.  Might
be able to write some tests for it later on but the first use case would
be to reuse the logic easily.

Change-Id: I140e72b91e592468498d87c14edefae279767ad7