command-line arguments for get-headings.rb

Updated get-headings.rb to take command line IO arguments for
convenience. Also made the number-of-columns verification
optional -- a questionable attempt at optimization.