To lessen the chances of this type of malware getting installed on your iMac, there is a setting you can change in Safari.
Open Preferences > General
Remove the check mark from the "Open "safe files" after download"
Perhaps Apple will start to ship new machines with that setting already made
Release a Security Update that changes it.
Looking for great gifts under $100?
Trendy tech gifts don't require a hefty price tag. Choose from these CNET-recommended useful and high-quality gadgets.