Add function and test for system.getScriptResults and system.getScriptActionDetails calls

Not sure if test are correctly.