adds feature: accept .gz files as input

if the .gz files are specified the files will be opened with gzip.open and read directly