tweaked unit tests a bit
moved init code to a class method SM_serial.open

added _write flag to check for read-only status

added _open flag to check if file is open
added tests of _open as guards on all public functions
changes to documentation