Fixed acumulation of quotes in variables that can lead to script errors.
Merge pull request #1537 from ruimalheiro/scriptquotesbug

Fixed acumulation of quotes in variables that can lead to script errors.