Make sure the target directory exists.