fix(rewrite): Handle needle not found error in rewrite function.

Throw exception - handled by current default handler - when the needle is not found in the rewrite fucntion.

Fixes #54