Fixed crashing bug with getNeighborsND (wrapAround=true case)

Fixes https://github.com/numenta/nupic.core/issues/125

@scottpurdy