Improves SDpath.py

Moved loose functions to a class, added better testing
Merge pull request #14 from simon816/fixes

Improves SDpath.py