if/unless options for rules

As requested in #105 here's my attempt to implement that.

See #105 for discussion and usage.