build-doc-javadoc: remove legacy dirs before proceeding