Added Windows support to get_host

Added operating system check and used appropriate ping for windows or unix operating system.