I tried to create a directory with `os.mkdir`, but it raised `FileExistsError`.

```
>>> import os
>>> os.mkdir('test')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
FileExistsError: [Errno 17] File exists: 'test'

```

The file `test` does exist, but it is a regular file instead of a directory.

```
  0 -rw-r--r--  1 sparkandshine  staff       0 Jan 31 17:09 test

```

How do I create a directory `test/` in this case?