The easiest way to ensure this, is to go through your scripts and replace $mircdir with $scriptdir
As to the version check, not a bad idea, but I'd recommend using $version < 6.3 rather than $version != 6.3
I believe you're knowledgeable enough to see why.