[Issue #292] Fix `sp-autoescape-string-quote-if-empty` not working, introduced in #281
When calling sp-insert-pair programatically, insert the opening pair before the testing is done
Add tests to cover #292