generate documentation when --install-dir is present. Pull
 request {#2229}[https://github.com/rubygems/rubygems/pull/2229] by Elias Hernandis.