In Perl, -z is defined as checking if a "file has zero size" and makes no mention what it does when given a directory. It looks like the behavior differs across platforms, which is why on Windows the SARIF file was always being deleted.
Whoops. I suspect that we're now unconditionally deleting all plist output, which isn't exactly what we wanted. I think we actually wanted to delete empty plist files here.