Fix computation of distance. Pretty major bug fix.

Didn't affect the motorcycle, but about 2x improvement on the map.

Before:
  evan@hood:~/wo/polargraph-optimizer$ ./process.py map.txt > /dev/null
  Total Glyphs: 8074
  Initial penup distance: 4107485
  Initial total distance: 4742961
  Deduped penup distance: 3494625
  Deduped total distance: 4040278
  Sorted penup distance:  5319295
  Sorted total distance: 5864948
  Greedy penup (i=0) 790134
  Greedy total (i=0) 1335787

After:
  evan@hood:~/wo/polargraph-optimizer$ ./process.py map.txt > /dev/null
  Total Glyphs: 8074
  Initial penup distance: 4107485
  Initial total distance: 4742961
  Deduped penup distance: 3494625
  Deduped total distance: 4040278
  Sorted penup distance:  5319295
  Sorted total distance: 5864948
  Greedy penup (i=0) 377168
  Greedy total (i=0) 922821