Merge pull request #15 from gwenn/piped

Fix when stdin is not interactive (file or pipe)