I'm aware of this issue, just waited for someone to mention it.
You get this error because you search for additional Template Packages and the script doesn't find any.
Replace this line
RunWait ( @ScriptDir & "\" & $TF & " /S" )with
If Not $TF = 0 Then RunWait ( @ScriptDir & "\" & $TF & " /S" )to get it working with whatever settings you use in the script.
@yadzil & Gorki
You're not alone, I hope someone can solve this problem too.