Fix error handling in getword at end of file.

Getword should return -2 at end of file, which indicates an error.
It used to return -1 with an undefined token, which would cause crashes
on incorrect invocations such as "ahcpd -C mode".