Use Script Editor's application's id.

Use application's id instead of application's name to send events
to (Apple)Script Editor, for better backwards compatibility and to
simplify the code.
Use application’s id in test file, too.