Make gen_netmask verify function arguments

Make `gen_netmask` raise a `ValueError` if `min_cidr` is less than 0 or
`max_cidr` is greater than 32. Add tests for this boundary checking code.

    $ make test
    python -m unittest discover --start-directory tests --top-level-directory .
    .................................................................................................................................................................
    ----------------------------------------------------------------------
    Ran 161 tests in 1.508s

    OK

Fix #57.