Various fixes to use bundler the right way

Hi!

I know the fixes are not in the thin repo (yet) but I think they are essential if the point of this gem is to be a vlad's plugin for thin.