Allow passing through file extensions to graph

Still defaults to png.