Improved handling of permissions • GPL Licence

Now handles location permissions better (so that it can work with iOS
8), but have not tried all permutations or verified yet with iOS7.