I don't think you can literally delete the log directory without running into problems, as that is the same location where your buffer(s) are stored, as well as your logs. Now from the log perspective, you can go to mIRC Options - IRC - Logging
then set Automatically Log: None (this is at the top of the drop down box)
then ensure that none of the check boxes are checked.
I think that'll stop the problem you're encountering, however, as I said, the fact that your buffers are stored in that same directory, means that the directory must be present.
If I may enquire, why are you having the log directory deleted in your script? Just because the directory exists doesn't mean you have to use it.