Added location rule.

I'm not quite sure how well it works yet, but it seems to be OK.
Also, it needs more error handling.
Added ringer mode action.