Make a single Main class for jar.

Used to be several classes with main methods. Simplify to one that can be used
for different kinds of file operations.
Merge branch 'gradle' into develop