Now Permission to take a screenshot is checked before taking a
screenshot is attempted.