1. support gunzip input + support stream/piped inp

This patch does the following:

1. Fixes the named pipe/streaming input bug
2. Very simply allows support for gzipped files (provided gunzip is in the path of the caller).

It can vastly improve the efficiency of some pipelines.