Added argparse support to the client script.

This looks better than the last attempt.
preferably everything below should go into a separate `main` function, that would be called here:
```python
if __name__ == "__main__":
    main()
```