Motion Fixes, Saving Motions when finished

Fixed save & load. Added header for getNextId() that should be
implemented. Added the DB directory to the repo. MotionHandler is
saving the motion when finished.