File/IO readlines supporting new params limit, and open mode

It fixes 12 failures, and 9 errors of the rubyspec test core/io/readlines_spec.rb
Let me know if I need to change anything.