Fix text block modifiers with parameters

The options hash for the text block modifiers was previously
not popped from the modifier text.

This makes sure that, if the last element is a Hash, to pop it.
Add tests for all text fragments

This just checks if the style hash has been removed from the
text.
Move tests to text_element_spec
Merge pull request #589 from phansch/FixTextBlockParams

Fix text block modifiers with additional parameters