Use localhost for test nodes
Add sleep after calling replicate/0

Dirty read from slave test case doesn't fail immediately after pushing
transaction log on slower machines.