Attempt to get the application name from the CFBundleName if the CFBundleDisplayName is not available. Also do so via the objectForInfoDictionaryKey which will use the localization if available.

Thanks to @vslavik (pull request #2).
Improved use of accessFileURL:withBlock:persistPermission: by allowing it to be called on the main thread. Internally it assumed it was not called on the main thread and could cause deadlock.

Thanks to @vslavik (pull request #1).