Added ignore of DS_Store files.
Resolved problem in algorithm

Resolved the problem in the algorithm by changing the indexing. Adding
of two extra points at each end is now integrated into solving
algorithm.

Merging to master branch.