You seem to be happy with the bulk of the answer: if e^r is outside of the interval [u,d], there is an easy long-short arbitrage, and the risk-neutral probabilities don't exist (because they are outside of [0,1] and therefore aren't probabilities); and if e^r is strictly inside [u,d], there is no arbitrage and the probabilities exist. This all agrees with the fundamental theorem of asset pricing. So far so good.
There is a subtlety involved in the boundary cases of e^r=u or =d, which you would not have been able to spot until now. In these cases, we get q=1 or =0, which appear to be valid probabilities. However, we require the full definition of a risk-neutral probability measure, which I only give in slide set (4) (slide 20). Part of this definition is that the risk-neutral measure must be equivalent to the original, real-world measure. If q=1 or =0, the measure Q does not agree with P about what has probability and what does not, and is therefore not equivalent. In these cases, therefore, the risk-neutral measure does not exist, strictly speaking. Furthermore, the long-short arbitrages are available in these cases (make sure you can see why), so the fundamental theorem holds again.
(This is all assuming that p is strictly inside [0,1], and not 0 or 1 exactly).