In my experience, files weren't being deleted for partially downloaded torrents or torrents containing multiple files. For anyone interested, I changed the $arg definition in the Script Filter to the following:
if ($monofile == 0){
$arg = $arg . ' ' . $id . ' ' . $monofile . ' ' . $dir . '/' . $name;
}
elseif (!is_null($finished)){
$arg = $arg . ' ' . $id . ' ' . $monofile . ' ' . $dir;
}
else{
$arg = $arg . ' ' . $id . ' ' . $monofile . ' ' . $dir . '.part';
}