Well, according to Khaled...
mIRC asks Windows whether the file name in question is a device name or not. If Windows says that it is a device, mIRC will prevent access to it.
So, mIRC is asking Windows and Windows is replying. If Windows *didn't* say that those were devices, then mIRC wouldn't consider them invalid filenames. As mentioned, the method used to ask Windows may be outdated with newer Windows versions, but with backward compatibility, there may not be an easy way to change how it asks Windows about this. Of course, mIRC could just allow writing to those no matter what and let Windows complain about it, but I don't know if that's any better either. I think a better idea would just be to have the error that mIRC generates explain that it's a device name so people actually know what the problem is (not sure if it does or not).