Fixed #23872 -- Removed sensitivity of migrations tests to CWD.