Work with either argparse or optparse

The argparse module is not available in old version of Python we need to
support. But for our simple usage, argparse and optparse are almost the same, we
just need a thin wrapper around the OptionParser class to work with either of
the modules.
Do not sys.exit from functions
Merge pull request #2 from vpodzime/master

Argparse/Optparse support and minor tweaks