Fix tests, remove dependence on local file system