Extract publish task logic from grunt-gh-pages

+ lint fix for git.js