safer test for currently running app

The previous version could fail if the specified bundle was not installed.
Here we tell "System Events" until determining it is safe to do otherwise.