First things first, please add transpose to some symbols whenever it is necessary.
Thanks for raising this question, myself tried to verify this when I was reading Koenker's monograph Quantile Regression. In general, the expression he displayed was correct, but I think he didn't write everything clearly (at least lacking necessary explanations for some parts) so I would like to present my own derivation here and call for more discussion.
Given a multivariate-variable and real-valued function $f(x_1, \ldots, x_n)$, the directional derivative of $f$ along a direction $\mathbf{w}$ at $\textbf{x}$ is defined to be:
$$\nabla_\mathbf{w}f(\mathbf{x}) = \lim_{h\to 0}\frac{f(\mathbf{x} + h\mathbf{w}) - f(\mathbf{x})}{h}$$
We shall verify the claimed result following the above definition. To alleviate the notation, denote $y_t - x'b$ by $u_t$, $\psi(b + hw; \theta, y, X)$ by $f(h)$, we want to show the limit of $(f(h) - f(0))/h$ exists and has the claimed form.
Straightforward algebra shows:
$$f(h) - f(0) = \sum_{t = 1}^T\left[-(u_t - hx_t'w)\mathrm{I}\{u_t - hx_t'w < 0\} - hx_t'w\theta + u_t\mathrm{I}\{u_t < 0\}\right]$$
where $\mathrm{I}(\cdot)$ is the indicator function.
We may now evaluate the limit term-wisely, by discussing the positiveness of $u_t$:
If $u_t > 0$, then the summand is $-hx_t'w\theta$ (the indicator function always takes zero when $h$ becomes sufficiently small), therefore:
$$\lim_{h \to 0}\frac{f(h) - f(0)}{h} = \sum_{t = 1}^T-\theta x_t'w$$
If $u_t < 0$, then the summand is $(1 - \theta)hx_t'w$ (the indicator function always takes one when $h$ becomes sufficiently small), therefore:
$$\lim_{h \to 0}\frac{f(h) - f(0)}{h} = \sum_{t = 1}^T(1 - \theta) x_t'w$$
For these two cases, the declared expression form were all successfully confirmed. However, the annoying and unclear case is that $u_t = 0$, for which, the summand is:
$$(\mathrm{I}\{-hx_t'w < 0\} - \theta)hx_t'w$$
Let $g(h) = (\mathrm{I}\{-hx_t'w < 0\} - \theta)x_t'w$, namely, the function after the above expression divided by $h$. Clearly, $g(h)$ is not differentiable at $0$. Hence it is very irresponsible to just state the result without any further explanation. We may discuss the right/left limit of $g(h)$ as $h \to 0$, which depends on the value of $x_t'w$.
$$\lim_{h \to 0^+} g(h) = (1/2 - 1/2\mathrm{sgn}(-x_t'w) - \theta)x_t'w \\
\lim_{h \to 0^-} g(h) = (1/2 + 1/2\mathrm{sgn}(-x_t'w) - \theta)x_t'w$$
So the result reported by the author is essentially the "right directional derivative" instead of "directional derivative".