Implement more of IO std library. Buffering settings, seekery and some error-handling stuff is still missing, but the rest is done.