Replace deprecated NSRunCriticalAlertPanel with NSAlert

- Now using modern API
- The dialog is now shown as a modal sheet
- The alert style is changed to NSWarningAlertStyle
- NSCriticalAlertStyle was not required

Motivation for this was the string literal warning, which was resolved by iluuu1994. But I noticed that the API was deprecated so ported it to new NSAlert.
I decided to show as a sheet because the failure is very focused to a specific preferences window. NSCriticalAlertStyle was according to Apple's docs not appropriated. They designed it for *really* critical things,  "for example, a “clean install” will erase all data on a volume".