Fix some deprecated IO.readline/0 calls.