Determine if path is a directory