A crazy, insane or terrorist-minded pilot has a reasonable shot of taking down the plane anyway, if they approach it methodically. The key is to ensure that pilots are properly screened and reviewed as well.
Armed pilots, with proper equipment and proper training, would likely prevent many more incidents than would occur from the very rare rogue pilot using these weapons in his or her own terrorist activities.