Invert selection support & more decentralization

getNumberOfDiffs supports byte and diff ranges.
makeFiles supports diff offset and length.
Main program is now a function.