Check if url is a directory.