Fix whitelist build run for phabricator diffs

Summary: T19295

Test Plan: Added unit test

Reviewers: vishal, cramer

Reviewed By: cramer

Maniphest Tasks: T19295

Differential Revision: https://tails.corp.dropbox.com/D73201