Don't close the fd twice when handling a directory successfully
Add support for the larger list of suffixes supported by gzip.