Fixed a syntax error preventing compiling in test_list_goals.py.

Also added it to the pants_test/tasks/BUILD testing suite, which it presumably should have been in in the first place, which is why no one caught this earlier.