Fixed which directories were being written to for frames, properly uses scratch files to pass to ripper.