POSIX compliant use of getcwd

POSIX says: If buf is a null pointer, the behavior of getcwd() is
unspecified.
Regenerate charmonizer.c with Solaris fixes