Oscilloscope saving data unexpectedly
It seems that this scope saves the min and max values per sample when in peak detect mode, as long as the sample rate is not at the maximum setting (one of the main features of peak detect mode, you get the extremes during the sampling period). 

Ordering it this way in the csv file will make it seem to jump back and forth, but if you sort it again the other way round, then you will notice that for your falling edge it will look like a falling edge over a few samples, but then again it will look like these glitches on the rising edge. 

To properly plot it, I think you want to take every other value and plot one as min, the other as max.