For issue #25

Note: ```::read()``` changed to ```::fread()``` instead of ```std::cin.read*()```, because it seems that the only way to reproduce current behavior with ```std::istream``` API is character-by-character reading that is ugly (```cin.read()``` blocks until exactly ```size``` bytes will be read; ```cin.readsome()``` never blocks on my system).