Fix grossness in Herald daemon

Summary: Do this in a reasonably proper / formal way. Leave a TODO for the policy stuff.

Test Plan: Ran `scripts/repository/reparse.php --herald rPnnnnn`

Reviewers: vrana

Reviewed By: vrana

CC: aran

Maniphest Tasks: T603

Differential Revision: https://secure.phabricator.com/D5150