Refactored the code that reads command-line options
Renamed -basefn option to -o