Ensure target directory exists.