Tweak Makefile rules to avoid race

Fix the Makefile rules to avoid a race for creation of the ebin
directory when running with parallel make (make -j)