xpath error handling

xpath fails if no hits are found, this adds some error handling. solves bug #33