Fix output directory creation.

Change-Id: If7a98baee5816fcd90666abe02f55fe0031242bf