Fix edge cases when adding missing curly braces

Addresses dericofilho/sublime-phpfmt#37