Wrap create_directory calls in try...catch blocks.

Ignores any exceptions thrown if directory exists, otherwise re-throws exception.

Rebased-By: Wladimir J. van der Laan <laanwj@gmail.com>