genpresync: fix reading from stdin