add folds
add two helper subs
add a hash-to-usage-string thing because nopt-usage is abandonware