Check if the path exists.