fix publish script to remove old files