pktgen: add function for running as sudo if not root

Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
pktgen: root_check_run_with_sudo() should use helper func err()

Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>