Fixed output directory validation.