Helper for checking if the provided permission string is granted for the calling application PID/UID.