Restart test if we get an IOError since that means something crashed.
Don't try to connect to the server port on startup with B2G since the hostname might not resolve
Remove some unneeded imports
Update package version