Fix activation behavior bug in OS X Yosemite by moving some code\nfrom `run` method to new `applicationDidFinishLaunching` method.