I would rather use the regExpReplace and remove the last '/' like below.
<modifySql>
<regExpReplace replace="/$" with=""/>
</modifySql>
The 'replace' sub-tag will change all occurrences of the '/', including in the data that you want to upload.