URL resource isDirectory() fix