Clean up around some of the new code plus tests

Adds some more tests to the plugin for coverage purposes and missed edge
cases, adds new defensive input handling in security group rule
creation, and other random cleanup.
Merge pull request #129 from Cerberus98/cleanup_merge

Clean up around some of the new code plus tests