Despite the claim in javadoc, r.getDirectory() can return absolute path