add analyzer base class
make it loading json to use from others
add two subdir globals
add 'workdir' arg to compute the path to save scanned data, and related changes