Fixed possible race condition in MkdirTask

See http://stackoverflow.com/questions/9290591/mkdir-in-ant-fails-how-can-i-handle-this-error