This Gem is not thread safe

This gem currently uses a shared ivar which will be overwritten by competing requests in threaded web servers - this PR fixes that by duping and calling out to a private method to eliminate sharing state between threads.