Fix bug in wrap_mirror (only on coord < -width), and add unit test.