Worst part about this is that these days the error message simply lies to the user. "Whatever.App is damaged and can't be opened. You should move it to the trash."

If you remove the 'quarantine' attribute that gets added to downloaded files it runs great.