(maint) Fix PE PuppetDB Accp Tests

Prior to this commit, the puppet enterprise puppetDB acceptance tests
did not work on Puppet Enterprise. This commit has
converted the open source puppet tests to work on both open source and
puppet enterprise.
(maint) Fix Helper tcp socket connection

Prior to this commit, there was a problem with a function in helper
that caused FOSS tests to fail for PuppetDB. This commit fixes that.
(maint) Fix Curl Command for Cent5

Prior to this commit, the curl command used in this test did not work
for Cent5. This commit fixes that problem.
(maint) Fix file with binary template curl output

Prior to this commit, the test file with binary template was printing
out the data from a curl statement, which messed up Jenkins. The data
that the curl statement was printing out contained invalid UTF-8 bytes
which Jenkins could not parse. This commit fixes that issue.
Merge pull request #537 from cprice-puppet/maint/master/cherry-pick-pe-acceptance-test-commits

Maint/master/cherry pick pe acceptance test commits