Fixed error messages with location rules

- Give proper error when adding a location rule with a non-existant
  resource
- Give proper error when adding a location rule without an expression