Backport of cfg-viewer.py from CMSSW_7_1_0_pre1.
Merge pull request #2237 from degano/cfg-viewer-to-62X-slhc

Misc fixes -- Backport of cfg-viewer.py from CMSSW_7_1_0_pre1.