Fixes some problems with CMake errors in stale builds, and of sdkconfig file being shared between parallel jobs.