What is the problem encountered for confidence interval for single proportion when $n$ is small and $p$ is close 0 or 1? My textbook says the $100(1-\alpha)\%$ confidence interval for $p$ has the form:

It also mentions that this only works for when $n$ is large and $p$ is not too close to 0 or 1. It tried to illustrate the problem with the following exercise:

I don't understand what the exercise is trying to show. Specifically, what does 'more difficult to obtain intervals with approximately a 95% confidence' mean?
Also, in the answer, it says if $p$ is between $0.1$ and $0.9$, our interval always covers $p$. I don't see how this is true from 8.10. 
 A: Formula 8.10 uses the normal approximation (the z-values are based on the normal distribution) for the binomial distribution, which works well with decent n and a non-extreme p. You can experimentally check this by simulating data while varying n & p and then look at the histograms (for example in R, via
hist(rbinom(10000, n, p))

You can also find information regarding the normal approximation of the binomial distribution on on Wikipedia: http://en.wikipedia.org/wiki/Binomial_distribution#Normal_approximation. 
Regarding, your second question: The exercise does not want you to use equation 8.10 but instead the alternative procedure for n = 1 given in the exercise itself. In this case if your one trial is a success you get the confidence interval $[0.1, 1]$ and if it is a failure you get $[0, 0.9]$. Since $[0.1, 0.9]$ is the intersection of both possibilities, any p between 0.1 and 0.9 is covered regardless of the result of your trial.
Finally, please note that there are other procedured to get confidence interval for binomial proportions. For example, the one used in R always has at least the coverage stated but is not as short as possible.
A: The confidence interval around a proportion is actually quite tricky. There are situations where increasing N makes the interval worse, and the best estimate of the actual proportion may not be the sample proportion. 
A good entry point into the literature on this is http://www.stat.ufl.edu/~aa/articles/agresti_coull_1998.pdf
