Added support for specifying the format of SPARQL graph results

This fixes both issue #49 and issue #50