api.lua: Fixed quotes escaping when passing data to the shell