Fix JENKINS-20030

Reverted to older configure method code and added a simple round trip test to make sure exceptions don't occur.