readLine: do not use strlen to determine line size

fgets may read a buffer that contains NUL characters.  Caught by
valgrind: when the first byte is NUL, invalid read occurred.