added ability to specify multicast_base_port etc from command line

and remove wrap around bug spotted by Toby