A Numerical Method for the Simulation of Skew Brownian Motion and its Application to Diffusive Shock Acceleration of Charged Particles