in reply to Safely create new directory
mkdir already fails if the path already exists.
$ perl -wE 'say mkdir "/"; say $!' 0 File exists [download]