SICStus Prolog caches the name of the current working directory. To
take advantage of the cache and to keep it consistent, foreign code
should call the following interface functions instead of calling
chdir()
and getcwd()
directly:
SP_set_current_dir()
SP_get_current_dir()