96b3b7115a
Also deal with possible directory creation errors. We can safely ignore them, since we would fail right after anyway. This will allow the code to deal with the case where the directory exists but we don't have enough perms to mkdir it.