Unzip file if zipped.

def unzip_file_if_necessary(self, source_file):
        """ Unzip file if zipped. """
        if source_file.endswith(".gz"):
            self.print_message("Decompressing '%s'" % source_file)
            subprocess.check_call(["gunzip", "--force", source_file])
            source_file = source_file[:-len(".gz")]
        return source_file