Generalize the application bundle copy workaround to simplify later reuse.