Add sparse support for distance-to-sphere.
Fix log filenames.
Reorganize test files.