Avoid race condition for 'api/html' dir.

With parallel Make, we sometimes see 'api/html' not created in time for these
rules, causing the build to abort.