Fix refcount logic.

Issue:	#19
Submitted by:	@mitchellh
Fix multiple values removing.
Add a test case for refcounts.