Added unit tests

Here are the unit tests for the current functionality.

They cover the actions array and the regexp g/i/m flags as per readme.md. 

You are now morally obliged to write any expansion of the module in test drive manner as well :)