get_relative_cwd(): clarify why it handles dir == NULL