Fix gating of identity and image apis

The handling of markdown documents was broken.

markdown is now setup correctly in building books.

We also follow the same logic as the identity-api in concatenating all
books together.

Change-Id: I8ae3cb4891199b81389142ea29060134cebc4194