Fix script tests

- Fix script tests to use loopback address instead of localhost