COMP: Fix unused variable warnings

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22402 3bd1e089-480b-0410-8dfb-8563597acbee
BUG: Fix loading of ".mgh.gz" file in py_nomainwindow_test_slicer_mgh

Method "IsCompressedFilename" has been copied from the improved fork
of MGHImageIO maintained by ITK folks (Hans).
See https://github.com/Slicer/itkMGHImageIO

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22403 3bd1e089-480b-0410-8dfb-8563597acbee
BUG: Fix "py_nomainwindow_test_slicer_mgh" allowing "mgh" to be saved

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22404 3bd1e089-480b-0410-8dfb-8563597acbee