fixed bug in plotdiff() when there is already a device open
added tests for legend(); added support for pos and offset in C_text(); fixed C_abline() for logged axes; fixed C_plotXY() for type="b" and added support for type="o"