wrap directory creation in try / catch.