Fixed bug in Path class.

I fixed bug in the Path class and added a .gitignore as I am now using
an IDE.