Fixes to CMake and errmsg.sys file searching with custom file locations.