some cleanups to ensure PortRange coercions are set, and give better error messages on errors i encountered
addressing code review comments: mainly using Exceptions rather than Throwable
Merge pull request #1170 from ahgittin/fix/misc

some cleanups to ensure PortRange coercions are set, and give better error messages on errors i encountered