Add tests for existing_dirpath
Add tests for socket creation errors