Fixed crashing bug with getNeighborsND (wrapAround=true case)

Fixes https://github.com/numenta/nupic.core/issues/125

@scottpurdy 
Can you elaborate slightly on this? Like just say that it is equivalent to `x % m` but ensures the result is positive?