Fixed improper matrix-dimension indexing

Traditionally, the y coordinate of a matrix is reversed from the
direction "+y" in cartesian coordinates. Now, the directionToSteps
method takes account of this reversal to give proper neigbors at each
site.