Only access sys.argv directly before parsing arguments

Accessing sys.argv is done in parse_arguments
Remove simple signalhandling, since it does not work in a mainloop