Finite-difference method for transport of two-dimensional massless Dirac fermions in a ribbon geometry