[WIP] Refactor of rake tasks

Working in progress for refactoring of the devutils publish and vendor rake tasks.
as below; if tmpdir moves to a `let` and cleanup on an `after` you'll get to remove the 'ensure' clause and the duplicate code betwene all 'it' clauses that use the tempdir! WOO :)