This is a different implementation of getlocalbase() than the one that has been reverted by Scott Long in SVN rev. r367711
Instead of a user provided buffer and calling conventions that require error checks, this version always returns a pointer to a valid string that is suitable as LOCALBASE path (but not validated).