Better command line parsing

This new procedure avoids "a" modifier in sscanf() so we don't need
free() memory anymore and the code is now compatible with OpenWRT!

Signed-off-by: Rodolfo Giometti <giometti@linux.it>