cast to unsigned char tolower(3) arg

fix copyrights: i got the AUTHOR section right but the comments wrong

tokenize: always return a valid NULL-terminated array if we couldn't extract even a single word from the string, make sure to return something that's not NULL otherwise the callers don't know whether we succeeded or not.

initial import