git-svn-id: https://chaste.cs.ox.ac.uk/svn/chaste/trunk@19781 b5f69653-2bf5-0310-8201-b0dafb8e1405
For #2424, make creating directories a little more robust to race conditions.

git-svn-id: https://chaste.cs.ox.ac.uk/svn/chaste/trunk@19783 b5f69653-2bf5-0310-8201-b0dafb8e1405