made this version of the script work with my files
Included .gitignore in the repo
Merge pull request #1 from homefc/homero

Added functionality for regular grids - all work done by Homero