Fixed bug in test that didn't use scratch directory