Added exception handler if path is invalid in XPATH lesson

Signed-off-by: Shivam Dixit <shivamd001@gmail.com>