Refactor tasks with grunt.file methods.