Fix possible warnings with node checks.
Fix possible warnings
Merge pull request #34 from adamlwgriffiths/warnings

Fix a few lxml warnings and potential errors.