tessel/runtime#530 r=@tcr: Fix JSON replacer function and test scripts.