You did a good job! If you're using Mac, please consider using the Firefox browser with Ublock origin as an extension. It will block the ads from even loading. It's a bit more clunky and not as nice looking, but a lot safer.
These ads are obnoxious and dangerous, and most browsers I know have a setting to disable this kind of "screen blocking popups". In my country google is not allowed to serve those kinds of ads at all.
I'm not a mac user so I don't know the settings or extensions you could use to help Safari prevent these from showing, but I honestly believe the people at apple would have made some kind of option available against it.
Then again - and I want to stay away from politics - I know the US has next to no regulations in regards to both software intrusiveness and ads, and ad servers might have paid apple a pretty buck to hide those kind of settings in their own favor.
If you can, running a virus scan is advised. Most browsers don't allow any programs to be downloaded and executed without user interference, but hackers are usually faster in finding the holes to poke through.