switch to java.io.File for directory comparison