Preventing NPE while creating a dir for the result file (RC). Fixes issue 6695