Re-introduced Yosys::readsome() helper function
(f.read() + f.gcount() made problems with lines > 16kB)