Fix some failing tests and attempt to fix running tests on a headless co...

...mputer