Globals::localize_path was calling change_dir to check if path exists

- Globals::localize_path was calling change_dir to check if path exists which has side-effect of changing current directory;Fix by calling new dir_exists api