Trouble.  This returns workbuf, which is a local variable of this function ... except that you forgot the word "return" which is required here, so this function actually returns a random pointer, which is probably a bad thing !
If you make workbuf static this can be salvaged.  (If you return a malloc()ed string, you avoid the problems with workbuf but you'll leak unless callers are required to free() this function's return, in which case the else clause's return also needs a strdup() call on it.)
GetInputDir() has exactly the same problems.

The compiler warns about the lack of return statement here: please check for new compiler warnings (e.g. ones mentioning your new functions) in future !  I'll patch this by making the arrays static.