Make a new blank script then put this in it:
alias sd return $+(",$scriptdir,")
Save it to C:\path\bug\script.mrc. Now go into explorer and change the folder name bug, to test. Go back to mIRC and type
//echo -a $sd - $exists($sd)
As you can see, the $scriptdir still has bug as the folder name, and that folder does not exist.