Bug 547898 - Null check osxDirectory to stop crashes