FIxes BuffredFile when fed a socket.

This fixes an issue where read() was being called on BufferedFile with no parameter (which is allowed).