Take arguments from main function instead of sys.argv

Signed-off-by: Maxime Petazzoni <max@signalfuse.com>