Detect if file is compressed based on suffix (*.gz).