[bin/ufo] turn class/method into nested sub

Limits the scope of this subroutine and shows where it belongs.

Also put the lexically scoped regexes into the sub, since they're
only used from in there.
[bin/ufo] replace mixins with hash and attrs

Prefer the order of the declarations of this variant. In the
previous version, it wasn't clear where the $.target and $.extension
methods were coming from.

Also, a net removal of 13 lines of code. Neat!