Use mkdir instead of stat+mkdir.