fix(sync.js): trim dead branches on set

Related #52
chore(release): bump version to 3.1.1
Merge pull request #53 from goinstant/mattcreager/hotfix-3.1.1

fix(sync.js): trim dead branches on set