Fix defects that resulted in the order of items in the processing pipeli...

...ne to be changed.

The sort method for updating the processing middleware pipeline was occasionally rearranging the items (weren't getting assigned a middlewarePriority).  I've simplified the method by simply appending the new middleware to the end of the pipeline and then moving it to the appropriate place in the pipeline.

Also, got the tests working again by copying the missing file from grunt-contrib-watch
is this a modified copy of `grunt-contrib-watch/test/tasks/helper`?