test some connection file utilities

includes regression test for #3977 and some basic coverage for a few utilities.