Moved .o .d files to obj/ and deps/.

Changed Makefiles so the intermediates are put to obj/ and deps/ directories repectively.