"Damaged" Mac App Fixer

Occasionally, when you download a zipped app on macOS, it refuses to open, displaying an annoying message like the following:

The vast majority of the time, there's nothing actually wrong with the program. A re-download or checksum verification never hurts, but in my experience, this is usually a glitch caused by an over-zealous Gatekeeper.

The solution is simple: just make a copy of the affected app without preserving certain metadata:

cp -RX /path/to/supposedly/damaged/program.app /path/to/fixed/program.app

Or, use the 5-line applet I uploaded here for your convenience.
Download

Update: A better solution called UnQuarantine is available from parrotgeek1's site. This service just removes the quarantine flag from the application, rather than making a full copy with no extended attributes. An equivalent Terminal command is:

xattr -d com.apple.quarantine /the/blocked/program.app