Make the python script slightly more robust in terms of the arguments it accepts.