Add beforeTokenWrite hook
Merge remote-tracking branch 'upstream/master'
Changes to attribute parsing and the way normal tokens are written
Add tests for beforeTokenWrite hook
Renamed beforeTokenWrite to beforeWriteToken, fixed lint
Merge pull request #89 from crocodele/master

New hook for handling tokens before they are written