[cs/java] clean output directory of old files

Subj. Hope now Travis will greenlight this.