refactor get_output_prefix into calculate_file_output* family and add command line options to control file name formatting behavior