Finite difference methods for a class of singular two-point boundary-value problems