Replace an "invalid syntax" Python test fixture with a generated tempfile.

This will resolve warnings when installing with easy_install, and also allows
us to not include a invalid-syntax file in our distribution (even though it's
only used for tests).

Fixes-bug: 1243667
Change-Id: I2bfe0d2a5b2f3944cd97951b9285d153bbcb9362