Added removing of the ebin dir if not empty.