Uploaded Python code for KDtree Module

Fixed defect in app_nn which had mistakenly computed minimum distances
in the case where it was "too close to call".