Replacing `optparse` with `argparse`

Hello,

Since optparse is deprecated, so I did a few modifications to the code to use argparse.
The only differences are that with argparse the order of the parameters does not matter.
I added an argument called "script_file"  *without* any minus-option (instead of a "-i/--input script_file"),
to have the same usage as optparse.

Regards