Sufficient condition for differentiability at endpoints. Let $f:[a,b]\to \mathbb{R}$ be differentiable on $(a,b)$ with derivative $g=f^{\prime}$ there. 
Assertion: If $\lim_{x\to b^{-}}g(x)$ exists and is a real number $\ell$ then $f$ is differentiable at $b$ and $f^{\prime}(b)=\ell$?
Is this assertion correct? If so provide hints for a formal $\epsilon-\delta$ argument. If not, can it be made true if we strengthen some conditions on $g$ (continuity in $(a,b)$ etc.)? Provide counter-examples.
I personally think that addition of the continuity of $g$ in the hypothesis won't change anything as for example $x\sin \frac{1}{x}$ has a continuous derivative in $(0,1)$ but its derivative oscillates near $0$. I also know that the converse of this is not true.
Also if that limit is infinite, then $f$ is not differentiable at $b$ right?

Since
$$
f(b+h)-f(b)=f'(\xi)h
$$
for some $\xi \in (b-h,h)$, you can let $h \to 0^{-}$ and conclude that $f'(b)=\lim_{x \to b-}f'(x)$.
On the other hand, consider $f(x)=x^2 \sin \frac{1}{x}$. It is easy to check that $\lim_{x \to 0} f'(x)$ does not exist, and yet $f'(0)=0$.
Edit: this answer assumes tacitly that $f$ is continuous at $b$. The question does not contain this assumption, although I believe that it should be clear that a discontinuous function can't be differentiable at all.
