Command-line argument parsing similar to Python's optparse library