Added void test for issue 48
Switched instanceof to isBuffer
unittests: fixed private equal check to indexof
Added ref error/alloc to unit tests
Merge pull request #49 from TooTallNate/issue-48

Added void test for issue 48