Fix use of SortBy in csw.getrecords2

Fixed use of sortby in csw.getrecords2 (Element expected instead of SortBy object when appending to node), and created a couple sorting tests.