Fixes some 'require' calls to 'require_relative'.  Adds command-line parsing to main script.