Switched to a Scanner instead of readLine, so that CR in URLs don't
break the reader.