Added __getslice__ and tests.
Added fromFile class method and tests.
Added toFile and tests.
Added another test for formatting dm.