Wait until all listeners are removed before finishing test. Closes GH-71.

Conflicts:

	test/add_test.js
	test/relative_test.js
	test/safewrite_test.js