Numerical Methods for Moving-Habitat Models in One and Two Spatial Dimensions