Added ts_code_copy_file utility function. Whitespace fixes crept in too.