Fix URL replacement in BaseOpenStackMockTest

This PR fixes the replacement of service URL strings containing spaces. How many of us have spent hours trying to debug something all because of a space? ;)
I probably didn't organize imports on the last commit. Will fix.