Added new class snake.py, incorporating the behaviour of snake segments.

This commit also edited segments.py to be compatible with the new snake.py
class. testimage.py is now able to get corners (does not work correctly)