Use Pathname when checking for root path.

Same as previous commit but when looking for challenges.