Change implementation of refs tests that alter the current repository to make them run against a temporary clone of the test repository