Added better way to insert rewrite middleware.
(As suggested by https://github.com/gruntjs/grunt-contrib-connect/blob/master/Gruntfile.js )