Fix block statement endings in erubis

Partial fix for #518

Tested with erubis 2.6.0 which is the oldest supported as well as the latest..