Integrated print-as-function into RunDoctestsScript.
Converted mainline doctests to use print-as-function.
Updated experimental doctests to use print-as-function.