Make getTempDir return a const char *, to avoid a compiler warning

No changes needed in callers, they weren't trying to mutate the string
anyway.