fix bug in b4187dfd2e21d81d30a76cbb977dc485d663b2a7 and extend to Mac OS X .app bundle