"Fixed" race condition in test script (as best is possible), fixed port parsing for remote URLs.