fix -gperf keyfile (return struct), simplify wmain funcs

gperf is now stable
return a pointer to a struct, which allows flexiblae return value(s), and better
exists check. for now only with gperf, maybe for all other also.