test first element of sys.path in Kernel

both when `--profile-dir` is specified, and when it is not.