Handle possible race condition when creating ipython directory.