suppress exception if dir exists and createPath is true

if we pass createPath=true then our intent is to create the directory no matter what, therefore there is no reason to throw exception if it already exists which saves the test of if ( !directoryExists(path) ) and the need for locking in a multithreaded scenario.