More robust check for the existence of classes dirs before resorting to leronen (non-gradle,
eclipse-oriented) CLASSPATH.