Fix escape code parsing.
Add tests for escape code parsing.