Added some tests and fixed a few bugs discovered with some of the modules in spyd.utils.