Update CSV_to_JSON.pl

Restructuring to place the processing of the command-line string into a subroutine. This could make it easier to allow the addition of more complex options later on.