created direction, ind2vec, etc

slightly modified edgecon, made all layer files binary. also made it so
that the condition to form a line between two points only requires that
the angle from one of them includes the other, not both.

confusion with imggrad at line 100 about atand function

created direction function. intakes a 2d array and outputs a 3 by n
array with x,y, direction info for each endpoint. direction of linear
fit to nearest neighbors on segment.

ind2vec function converts a 1d array of indecies to two 1d arrays of the
X and Y values. made because conncomp contains things in a linear index.