Tests for packet handling

When I was working on adding some features recently I saw that func monitor() wasn't easy to test so I broke out the part of it that handles Packets from In and wrote some tests for it to provide full coverage for the new function packetHandler()