Replace deprecated gets with fgets
Eliminate compiler warnings
Detect mismatch at zeroth index properly
Merge pull request #2 from baruch/fixes