Have logger add a newline when it opens an existing file, convert that into a new "track segment" in the GPX file

An empty line causes $csv->getline_hr() to returns a hash of undef's (except for the first column, which is an empty string).
It's easier to detect the empty line when using $csv->getline(), so I use it instead and convert the row data to a hash manually.
Add descriptive comments to the logger sketch and csv2gpx.pl program