bufferutils: use native isSafeInteger if possible

Also adds a few more tests to assert this is working correctly from both
perspectives.
bufferutils: test fixture filename copies parent