Fix for the issue with empty link tags and also one other minor problem I found

FIX: pagequery sometimes creates empty link tags (see MrBertie/pagequery#22)

FIX: Invalid HTML output when using "snippet=plain" or "snippet=quoted"