Fixed publish task path handling

Fixed publish task so that it works properly when the path of a file to be uploaded contains *.js as in ".../ember.js/dist/ember.js"