Filter xpath validation

fixes: http://manage.dimagi.com/default.asp?74538

Turns out validating the xpath was approximately not at all harder than validating that it wasn't empty.