Support generic compressed files by always extracting compressed files to a temporary file first

Fixes #1.