The error most likely  indicates that it couldn't write to the specified output directory specified in the script. Either the filepath is invalid (folder doesn't exist) or the permissions on the folder aren't sufficient for it to write to it. Make sure that the file path the script is using for its output is valid and that the destination folder has the proper permissions to allow things to write to it.