Improve error handling

Call complete callback only once
Add test for get error results
Merge branch 'replicate_abort_error' into myway

Conflicts:
	lib/replicate.js