Rebased fix replay

I have rebased (from current development branch) and reorganised my fixes and enhancements to the replay system, including putting some magic into the files so they can be identified more readily.  Hopefully these modifications and fixes can be adopted in their entirety, as they are interlinked - removing one step may clobber later ones...

This replaces #129 entirely and I will close that one now.
If you'd like to return a value you can return it as the third argument, so nil, message, value.

Return values of zero or non-zero have no place in Lua where zero is true :) ``true`` for success, ``nil, message`` is the Lua paradigm.