fixed the return value from mkdir when the directory already exists.
WIP