Add fatJar task and apache cli dependency
Refactor invoke-static tests

Makes some progress towards fixing tests also.