Fixes for issue #188. These are changes to the way some tests are done to make them more stable across various environments and not to the code.