Proper serialization of method calls for *.ks scripts.