Perhaps a better solution here is to let Java build the paths for you, eg:

    new File("conf", confFile.getCanonicalPath.substring(confDirectoryLen))

Or this might work too:

    "conf" / confFile.getC...