Check that error is improving before endlessly adding grains to PDep calculation.

This should stop the endless loop that fills memory with 100 million grains and 
fails, when a network is fundamentally flawed. (See issue #77)