Do not try to write cache file because check file runs as `nagios` and file owned by `root`
- This turns the Nagios check into something that does not try to write the file in /tmp.
- Also fixes a logic error when checking whether there are CRITICALs or WARNINGs