Fixed timeouts with BufferedReader.ready()

Thanks to that thread on Stack Overflow; too lazy to check my history
for the URL again... sorry!