Slightly more robust version of looking for clean/dirty repo for prompt.