Fix issue where gr discover splits incorrectly on path names containing spaces