use xgetcwd() to get the current directory or die