Workers can now shutdown in case of no more work

Add argument -finish
Initial implementation of analysis-tool