One possibility that occurs to me, is that the $scriptdir path may have spaces in it, thus try changing your line 718 to
Code:
var %f = $qt($scriptdirinfo.txt)
then try your script again.