modified grid_graph generator to not mutate input parameters
Merge pull request #814 from AndrewWalker/master

More Pythonic behaviour for the grid_graph generator