Add simpler version of is_directory. It will be used in clang.