Fixed BUFFER_LEN issue on Lexical module.

Whenever a token was incomplete in the buffer, the program would
hang up on itself, being trapped on an infinite cycle because
iostream::getline sets its failbit state to true whenever the
method fails to encounter the delimiter ('\n'). Fixed the issue
and hopefully it can recognize the tokens properly now.