JSON reports support

Modified the script to read a system property that defines the report
format to be used: JSON or HTML (default).
//TODO: move to project property rather than system property.