config: fix tls_cert tls_key handling
refactor tests and add additional TLS tests
Merge pull request #78 from mreiferson/tls_fixes_78

TLS is (I believe) broken