Flatten out changes from PR

squashed patch from @damondouglas https://github.com/dart-gde/discovery_api_dart_client_generator/pull/80

@kevmoo BTW the `'generate library via API and analyze'` fails by timeout on my laptop for some reason. 

```
–(~/dart/discovery_api_dart_client_generator)–($ dart tool/hop_runner.dart --log-level all test
test: Started at 2013-09-04 20:26:13.068
test: config: onInit
test: config: onStart
test: Starting generate - no args
test: generate - no args -- PASS
test: Duration: 0:00:00.111000
test: Starting generate - help
test: generate - help -- PASS
test: Duration: 0:00:00.088000
test: Starting generate - generate library via API and analyze
Library discovery_v1_api_client generated successfully.
test: [error] generate - generate library via API and analyze
      Test timed out after 20 seconds.
      null
test: Duration: 0:00:20.000000
test: Starting generate - generate library via CLI
test: generate - generate library via CLI -- PASS
test: Duration: 0:00:01.028000
test: Starting generate - "rest" args should throw
test: generate - "rest" args should throw -- PASS
test: Duration: 0:00:00.095000
test: Starting generate - missing output directory should throw
test: generate - missing output directory should throw -- PASS
test: Duration: 0:00:00.092000
test: 5 PASSED, 0 FAILED, 1 ERRORS
test: Finished at 2013-09-04 20:26:43.322
test: Run time: 0:00:30.254000
Task did not complete - FAIL (80)
```