fix_code_gen

Fix Scroogen and add tests

Testing Done:
Local
[tw-172-25-147-196 pants]$ ./pants tests/python/pants_test/tasks:scrooge_gen
Build operating on top level addresses: set([BuildFileAddress(tests/python/pants_test/tasks/BUILD, scrooge_gen)])
================================================================================ test session starts ================================================================================
platform darwin -- Python 2.6.7 -- py-1.4.20 -- pytest-2.5.2
plugins: cov, timeout
collected 2 items

tests/python/pants_test/tasks/test_scrooge_gen.py ..

============================================================================= 2 passed in 0.41 seconds ==============================================================================
tests.python.pants_test.tasks.scrooge_gen                                       .....   SUCCESS
[tw-172-25-147-196 pants]$

CI:
https://travis-ci.org/pantsbuild/pants/builds/27696757

Bugs closed: 226

Reviewed at https://rbcommons.com/s/twitter/r/538/