Fixes #3527 : fix error on escape directive script

http://www.rudder-project.org/redmine/issues/3527