Improvement to creating output directory if it doesn't exist.