Fix problem with incomplete end sequences

Some terminals seem to not issue the complete end sequence '[0m' for returning to default color, but using a shorthand '[m', which can be fixed with a little tweak of the regular expression.
merged branch retiolum/master (PR #2)

This PR was merged into the master branch.

Discussion
----------

Fix problem with incomplete end sequences

Some terminals seem to not issue the complete end sequence '[0m' for returning to default color, but using a shorthand '[m', which can be fixed with a little tweak of the regular expression.

Commits
-------

f7aa50d Fix problem with incomplete end sequences
added a test for #2