api#os/dir/create: fix typo in #dir checking