Fix all rubocop complaints

Per https://github.com/opscode-cookbooks/firewall/issues/28

Fix the rubocop complaints about branching and complexity. In an unusual turn of events, this actually made the library code easier to read.