reorders processing of arguments (help text first)

fixes error message when directory access fails

adds simple tiny test suite and updates license headers

(0) -30 -10 -3 +3 +10 tip

mercurial