CCC server seems to want to use the POSIX version.
Removed any instance of basename being given a static string.
Forgot to free.