Update Test.cpp

sorted pairwise distances by image and write out to file