Unfortunatly, it is impossible to get replays to work correctly at the moment with any script that changes joints not during a normal pause-and-set-joints event.
From experimentation, the way i think replays work can be thought of like a flash animation loosely. Every time you set joints normally and hit space, it saves a "keyframe" into the replay data, and computes or "tweens" the physics from that until a new "keyframe" is created, and so on and so on. The "keyframes" include positional data, so thats why you get the warp effect, and also why limbs reattach sometimes, etc... It also sets a "keyframe" on every DM and frac, because that changes how things need to be processed for physics to play out right. I have tried repeatedly force DMing the same joint every frame, but apparently the code checks to make sure it is not DM already, so I couldn't work around it like that, lol
For replays to work, LUA needs to have a function to manually set these "keyframes" as needed, but I have a feeling with this script, the rpl files would get pretty big if I saved a "keyframe" every turn. :/
So the jury is out on the future, but for now, no replay support. Sorry guys/girls. ;.;