Make invalid paths error test more accurate