Fix Spellbook.fixOrphanWords Component

- Prevent string concatenation and replacement
- Remove trailing whitespace
Add Spellbook.fixOrphanWords spec