Fix for EOF issue on c-parser branch
Fix EOF issue on c-parser branch due to parser_handle_eof() not explicitely returning a value if state is START_RECORD. This results in the return value sometimes incorrectly set to -1 on Mac OS (seems to work okay on linux though). As a result, a parser exception is raised even though the file is read correctly.

Patch returns 0 if parser state is START_RECORD, since that should mean that a line has just been finished being parsed correctly and it's at a valid end of the file. Also added a default return value of -1 if none of the other tests pass.

Good catch. I'm surprised I never hit this issue (I've been developing on Linux and Mac)
