fixes #16

take into account both the source AND destination addresses and their
protocols when determining if a v4 or v6 rule should be generated.
adding spec tests for #16
Merge branch 'issues/16'