SystemTools: Revert "Reduce scope of 'buf' variable in CollapseFullPath"
Revert commit 6e36d909 from !143 (merged). A pointer to the buffer is returned by Getcwd
and stored in res_in_base
. The buffer must remain valid for the lifetime of that variable.