Replace relative with absolute imports for tests.