When executing the script from a directory that the script is not present in it fails the checks for Yara32.exe and Yara64.exe as the script is checking the directory the script is being run from for the files rather than the location the script is in.
Similarly the Yara.yar download goes to the directory that the script is run from.