Refactor network/http/connection peer verify specs

The tests added in f064ef76c98205037cb94c30dfbc21d6ee504641 used Unix style paths, which caused the tests to fail on Windows since paths are expanded differently on Unix and Windows. This commit refactors the tests to extract test setup, and expands the file paths properly on Windows and Unix.