Make proper XML out of path-sorted output
Quote variables that could contain whitespace