Implemented issue #116 by allowing recording to happen within scripts.