It's also a really good idea to make the file names EXACTLY match the class name. The files should be Motor.cpp and Motor,h, not motor.cpp and motor.h.
Typo, they are actually named Motor.cpp and Motor.h and in ~/Documents/Arduino/Libraries folder
When you add a library, you need to close and re-start the IDE.
That depends on where you add the library. Add it to the libraries folder, and yes the IDE needs to be restarted. Add it to the sketch folder, using the create tab option, and no, it does not need to be restarted.
I did restart every time i tried to add it. And for some reason i followed your advise of adding it to the sketch and it turns out it says i'm declaring classes twice which means it actually added the library after i added the file to the sketch, i just deleted the sketch and it seems to work again. Wierd?
Well, at least it works now, thanks everyone!