Command parsing

New command parser using regular expressions.

Closes #5 and related to issue #7.

Rename function to `encode_escaped_characters`.