[0.1.4] add #replace test, fix replace

Signed-off-by: Eli Skeggs <skeggse@gmail.com>