Fix expansion of :s substitution

Closes #52.