make pivotxt a proper gem

I've introduced some changes to fix some of the dependency resolution errors in the gem

I've also fixed what appears to be a spec regression