Add support for command-line arguments for recorded scripts.

Note that the arguments to record.js had to change in order
to support such arguments.  Also add a unit test.
fix test