Fix fgets warnings

This fixes warnings observed in #12 

Yeah. I see what you did there. I just think putting it twice makes the
whole thing a little more readable. Otherwise, you read it out and
depending on a variable either discard it or parse it.