Synchronously and recursively creates a directory. Returns undefined or the first directory path created.