Undo the removeFile calls, they don't make any difference
Avoid creating a silly overwritten generated file in unchanged, make the bash script smarter instead
Use .tmp.$FILE instead of $FILE.tmp, so tup doesn't spot it
Change to using an explicit sh call to run the scripts