csv_cat: fix when file does not have final new line and python3 support