Catch the correct exception for os.makedirs.