Unhardcode the paths in tests and only called Socket where we need it