[minor] Cleaned up and improved test-hook binary.