Merge pull request #1759 from vitek-karas/NativeSearchDirsFix
hostfxr_get_native_search_directories must fail when given CLI command
There's no check that when running with a "command" like hostfxr_get_native_search_directories that the code will not try to locate SDK and run CLI commands.
If it happens not only it does wrong things, but the return values are bogus (it doesn't fill the output buffer).
This change adds the necessary check to avoid this completely. It also makes sure that the output buffer size is always correctly set, even on errors.
Moved all the tests for hostfxr_get_native_search_directories to use nativehost and add a test to cover this case.