A lot of credit goes to
In the attached pdf I lay out the derivation for second order finite differences for non-uniform grid spacing for first and second derivatives. Higher derivatives can be approximated in a comparable fashion...albeit with a lot more algebra involved in finding the derivatives.
I use Lagrange interpolating polynomials as the base functions and it results in the same derivatives that they provide at http://www.scientificpython.net/pyblog/non-uniform-first-order-finite-differences for the first derivatives. Second derivatives are the same for the inner points, but they only supply the first order accurate second derivatives at the endpoints. I wanted a better solution at the ends so I derived it myself. This derivation contains second order accurate approximations for the endpoints as well.