Added CLI args processing to discover.py.