This is a great idea and something I've faced and had to implement manually in the past.
The most common scenario for me was: I implement backup, done by a daily cron calling pg_dump. It worked and I moved on, until one day I needed to restore and the backups did not work. Typically at some point the VM failed to run the commands to clear temporary backup files, the disk would fill up and the new backups would be truncated mid way.
psql is pretty awful at identifying this which must be a very common scenario. Instead of a header check leading to "Corrupted backup, aborting" or something, it simply executes the SQL commands until it reaches the very last line, which will be truncated midway and thus invalid SQL.
Anyway, it took some time to figure out, but later I did basically what your tool does, probably simpler: another daily cron job that downloads the file and checks if it ends with the correct pg_dump success signature. It has worked so far.
[dead]