With output-dir does not exist can result in error.

If more than one thread then there is a race between testing the existence of the
directory and creating it. Creating it results in an error if it already exists and
the original code would fallback to the default directory on seeing this error.

The correct logic is to attempt to create the directory and ignore errors (which is what
mkdirs() does anyway), then make sure that the directory exists afterwards.

git-svn-id: http://svn.mkgmap.org.uk/mkgmap/trunk@2679 25d90789-57f7-4ee0-8453-03a3dfeeeb22