Bug Fix

Corrected a bug in the upload script that removed too many <template>
tags when the template included <learn> tags