Added test for replacements and fixed mistake in replacements implementation.
Added section about replacements in readme.